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

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

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

    夢幻之旅

    DEBUG - 天道酬勤

       :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理 ::
      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)  編輯  收藏 所屬分類: SpringTOOL

    評論

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

    主站蜘蛛池模板: 亚洲国产精品13p| 日韩免费福利视频| 亚洲白色白色永久观看| 成av免费大片黄在线观看| 亚洲精品国产综合久久一线| 亚洲欧美在线x视频| 免费精品国产自产拍观看| 国产精品亚洲综合网站| 亚洲第一区精品观看| 一区二区三区免费视频网站| 国产综合亚洲专区在线| 国产在线观看免费视频软件 | 日本特黄a级高清免费大片| 亚洲经典千人经典日产| 国产一区二区三区在线免费| 一区二区三区免费在线视频 | 亚洲国产精品18久久久久久| 国产大片51精品免费观看| 日本高清不卡中文字幕免费| 国产亚洲色视频在线| 桃子视频在线观看高清免费视频| 亚洲国产成人手机在线电影bd| 成人毛片免费观看视频大全| 麻豆安全免费网址入口| 奇米影视亚洲春色| 最近免费中文在线视频| 色综合久久精品亚洲国产| 久久久久亚洲精品无码网址| 性xxxxx大片免费视频| 一本色道久久88亚洲精品综合 | 91在线免费观看| 亚洲国产成人九九综合| 免费jlzzjlzz在线播放视频| 国产免费无码一区二区| 亚洲一区二区三区亚瑟| 亚洲精品无码AV中文字幕电影网站| 精品亚洲永久免费精品| 亚洲色成人网站WWW永久四虎| 国产亚洲老熟女视频| 在线成人爽a毛片免费软件| MM1313亚洲精品无码久久|