<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ù)  更多評論
      

    主站蜘蛛池模板: 日韩毛片免费一二三| 国产99在线|亚洲| eeuss影院免费92242部| 国产乱子伦精品免费无码专区| 亚洲国产精品免费在线观看| 无码av免费网站| 久久久久亚洲AV无码网站| 99久久99久久免费精品小说| 亚洲黄色三级视频| 成人性生交大片免费看无遮挡| 亚洲日韩乱码久久久久久| 福利免费观看午夜体检区| 亚洲不卡影院午夜在线观看| 嫩草影院在线免费观看| 国产成人亚洲综合无| 亚洲一区AV无码少妇电影☆| 曰批全过程免费视频在线观看无码 | 久久A级毛片免费观看| 亚洲色欲或者高潮影院| 无码人妻精品一二三区免费| 日韩色日韩视频亚洲网站| 国产精品xxxx国产喷水亚洲国产精品无码久久一区 | 国产亚洲午夜高清国产拍精品| 中文字幕视频免费在线观看| 亚洲成A∨人片在线观看不卡| 久久99国产乱子伦精品免费| 亚洲乱码一二三四区乱码| 国产无遮挡吃胸膜奶免费看| 国产福利电影一区二区三区,免费久久久久久久精 | 国产成人免费全部网站| 天堂在线免费观看| 亚洲男人的天堂在线| 免费高清小黄站在线观看| 亚洲免费日韩无码系列| 亚洲天天做日日做天天欢毛片| 无码日韩精品一区二区免费| 九九久久精品国产免费看小说| 久久亚洲AV无码精品色午夜| 国产a级特黄的片子视频免费 | 中文字幕无线码免费人妻| 亚洲性无码av在线|