拦截器

 

 

拦截器

<?xml version="1.0" encoding="UTF-8" ?>

<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.3//EN"
    "http://struts.apache.org/dtds/struts-2.3.dtd">

<struts>
   <package name="abstract_struts" abstract="true"  extends="struts-default" namespace="/">
           <interceptors>
               <interceptor-stack name="myStack">
                   <interceptor-ref name="defaultStack"></interceptor-ref>
                   <interceptor-ref name="authority"></interceptor-ref>
               </interceptor-stack>
               <interceptor name="authority" class="com.seecen.interceptor.LoginInterceptor"></interceptor>              
           </interceptors>
           <default-interceptor-ref name="myStack"></default-interceptor-ref>
           <!-- 定义全局Result -->
           <global-results>
               <!-- 当返回login视图名时,转入/login.jsp页面 -->
               <result name="login" type="redirect">/login.jsp</result>
           </global-results>
   </package>
<!-- 
    <package name="user" namespace="/user" extends="abstract_struts">
        <action name="userAction" method="execute" class="com.seecen.action.UserAction">
            <result name="success">/index.jsp</result>
               <result name="input">/fail.jsp</result>
        </action>
    </package>     -->
</struts>

 

posted @ 2015-01-22 15:02  江湖一笑  阅读(164)  评论(0编辑  收藏  举报