<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    夢幻之旅

    DEBUG - 天道酬勤

       :: 首頁 :: 新隨筆 :: 聯(lián)系 :: 聚合  :: 管理 ::
      671 隨筆 :: 6 文章 :: 256 評論 :: 0 Trackbacks
    web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
        xmlns:xsi
    ="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation
    ="http://java.sun.com/xml/ns/javaee 
        http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
    >
        
    <context-param>
            
    <param-name>contextConfigLocation</param-name>
            
    <param-value>
                classpath:applicationContext-acegi-plugin.xml
            
    </param-value>
        
    </context-param>
        
    <filter>
            
    <filter-name>AcegiFilterChainProxy</filter-name>
            
    <filter-class>
                org.acegisecurity.util.FilterToBeanProxy
            
    </filter-class>
            
    <init-param>
                
    <param-name>targetClass</param-name>
                
    <param-value>
                    org.acegisecurity.util.FilterChainProxy
                
    </param-value>
            
    </init-param>
        
    </filter>
        
    <filter-mapping>
            
    <filter-name>AcegiFilterChainProxy</filter-name>
            
    <url-pattern>/*</url-pattern>
        
    </filter-mapping>
        
    <listener>
            
    <listener-class>
                org.springframework.web.context.ContextLoaderListener
            
    </listener-class>
        
    </listener>
    </web-app>

    applicationContext-acegi-plugin.xml
    <?xml version="1.0" encoding="UTF-8" ?>
    <beans xmlns="http://www.springframework.org/schema/beans"
        xmlns:xsi
    ="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation
    ="http://www.springframework.org/schema/beans 
        http://www.springframework.org/schema/beans/spring-beans-2.0.xsd"
    >

        
    <bean id="filterChainProxy"
            class
    ="org.acegisecurity.util.FilterChainProxy">
            
    <property name="filterInvocationDefinitionSource">
                
    <value>
                    CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
                    PATTERN_TYPE_APACHE_ANT
                    /**=authenticationProcessingFilter
                
    </value>
            
    </property>
        
    </bean>
        
    <bean id="authenticationProcessingFilter"
            class
    ="org.acegisecurity.ui.webapp.AuthenticationProcessingFilter">
            
    <property name="filterProcessesUrl"
                value
    ="/j_acegi_security_check" />
            
    <property name="defaultTargetUrl" value="/main.jsp" />
            
    <property name="authenticationFailureUrl"
                value
    ="/index.jsp?login_error=1" />
            
    <property name="authenticationManager"
                ref
    ="authenticationManager" />
        
    </bean>
        
    <bean id="authenticationManager"
            class
    ="org.acegisecurity.providers.ProviderManager">
            
    <property name="providers">
                
    <list>
                    
    <ref local="daoAuthenticationProvider" />
                
    </list>
            
    </property>
        
    </bean>
        
    <bean id="daoAuthenticationProvider"
            class
    ="org.acegisecurity.providers.dao.DaoAuthenticationProvider">
            
    <property name="userDetailsService" ref="userDetailsService" />
        
    </bean>
        
    <bean id="userDetailsService"
            class
    ="org.acegisecurity.userdetails.memory.InMemoryDaoImpl">
            
    <property name="userMap">
                
    <value>
                    huyvanmin=huyvanmin,PRIV_COMMON,PRIV_1
                    huyvanpull=huyvanpull,PRIV_COMMON,PRIV_1,PRIV_2
                    huyvanlee=huyvanlee,disabled,PRIV_COMMON,PRIV_1
                
    </value>
            
    </property>
        
    </bean>
    </beans>

    index.jsp
    <%@ page language="java" import="java.util.*" pageEncoding="GB2312"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
      
    <head>
        
    <title>測試</title>
        
    <meta http-equiv="pragma" content="no-cache">
        
    <meta http-equiv="cache-control" content="no-cache">
        
    <meta http-equiv="expires" content="0">    
        
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
        
    <meta http-equiv="description" content="This is my page">
        
    <!--
        <link rel="stylesheet" type="text/css" href="styles.css">
        
    -->
      
    </head>
      
    <body>
        
    <form name="meForm" method="post" action="/j_acegi_security_check">
            用戶名:
    <input type="text" name="j_username"/> <br />
            密  碼:
    <input type="text" name="j_password"/> <br />
            
    <input type="submit" value="登陸"/>
        
    </form>
      
    </body>
    </html>
    posted on 2008-08-27 00:18 HUIKK 閱讀(324) 評論(1)  編輯  收藏 所屬分類: Spring 、TOOL

    評論

    # re: acegi基于內(nèi)存存儲用戶的身份認(rèn)證 2008-08-28 20:13 吳云鳳
    5252  回復(fù)  更多評論
      

    主站蜘蛛池模板: 国产亚洲人成网站观看| 黑人粗长大战亚洲女2021国产精品成人免费视频 | 99视频在线免费| 亚洲啪啪AV无码片| 免费国产在线精品一区| 在线播放免费播放av片| 亚洲最大中文字幕| 亚洲视频在线观看免费| 亚洲av无码乱码国产精品| 中文字幕免费在线看线人动作大片| 免费人妻av无码专区| 国产偷国产偷亚洲清高APP| 国内一级一级毛片a免费| 亚洲mv国产精品mv日本mv| 日韩精品免费一级视频| 亚洲色图国产精品| 免费黄色电影在线观看| 国产偷v国产偷v亚洲高清| 香蕉免费在线视频| 亚洲综合熟女久久久30p| 国产日韩AV免费无码一区二区三区| 免费a级毛片无码av| 国产午夜亚洲精品不卡免下载| 日韩中文字幕免费| 亚洲JLZZJLZZ少妇| 国产黄色片在线免费观看| 亚洲av成人片在线观看| 国产色爽女小说免费看| 久久水蜜桃亚洲AV无码精品| 国产精品深夜福利免费观看 | 人妻18毛片a级毛片免费看| 亚洲国产午夜福利在线播放| 老司机精品视频免费| 亚洲XX00视频| 亚洲高清免费视频| 亚洲热线99精品视频| 最新国产乱人伦偷精品免费网站| 亚洲av永久无码精品古装片| 久久精品无码专区免费东京热| 亚洲成在人线中文字幕| 妻子5免费完整高清电视|