在配置好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 閱讀(248) 評論(0)  編輯  收藏 所屬分類: Spring個人學習日記
          主站蜘蛛池模板: 舒兰市| 万源市| 兴义市| 平塘县| 洪洞县| 定远县| 黄梅县| 繁峙县| 祁门县| 汤阴县| 当涂县| 桦南县| 台湾省| 德江县| 玉林市| 余干县| 肥东县| 庆阳市| 南投县| 罗田县| 义乌市| 于田县| 务川| 景宁| 福泉市| 洪湖市| 鄯善县| 东乡县| 富源县| 察哈| 凤城市| 北流市| 泾川县| 伊宁县| 阿拉善左旗| 裕民县| 宁蒗| 平乡县| 宜丰县| 筠连县| 麻栗坡县|