在配置好acegi的那些filter之類什么的之后,建立index.jsp、login.jsp、order/authorizeOrder.jsp、order/createOrder.jsp文件,按照之前的配置,權限分配是:
              /index.jsp=ROLE_ADMIN,ROLE_TECHNICIAN
              /order/createOrder.jsp=ROLE_TECHNICIAN
              /order/authorizeOrder.jsp=ROLE_ADMIN
              /login.jsp=ROLE_ANONYMOUS,ROLE_TECHNICIAN,ROLE_ADMIN

          login.jsp的form:

          <form action="<c:url value='j_acegi_security_check'/>" method="POST">
          <table width=50% border=0 align="center">
           <tr>
            <td>User:</td>
            <td><input type='text' name='j_username'
             </td>
           </tr>
           <tr>
            <td>Password:</td>
            <td><input type='password' name='j_password'></td>
           </tr>

           <tr>
            <td colspan='2'><input name="submit" type="submit">&nbsp;
            <input name="reset" type="reset" value="Clear"></td>
           </tr>
          </table>
          </div>
          </div>
          </form>


          使用相應的用戶名登錄后即可有相應的權限,否則重新轉到登錄頁面。

          posted on 2008-03-05 15:52 lzj520 閱讀(251) 評論(0)  編輯  收藏 所屬分類: Spring個人學習日記
          主站蜘蛛池模板: 武清区| 郓城县| 临汾市| 蒲城县| 临泽县| 万载县| 安岳县| 麦盖提县| 南通市| 涡阳县| 浦江县| 泗阳县| 灵石县| 苗栗市| 汉阴县| 大冶市| 浦江县| 河东区| 张掖市| 当阳市| 武乡县| 荔浦县| 交口县| 宜宾市| 乐平市| 木里| 阜阳市| 习水县| 兴城市| 揭阳市| 镇远县| 二连浩特市| 苗栗县| 嘉荫县| 安阳市| 保靖县| 湖北省| 永善县| 永昌县| 澄城县| 两当县|