strus interceptor

<interceptors>
    <!-- 定义拦截器 -->
<interceptor name="login" class="class" />
<!-- 定义拦截器栈 -->
<interceptor-stack name="loginDefaultStack" >
     <interceptor-ref name="login">
        <param name="excludeMethods">login,welcome</param>
     </interceptor-ref>
     <interceptor-ref name="defaultStack"/>
</interceptor-stack>
</interceptors>
<default-interceptor-ref name="loginDefaultStack" />
<!-- 全局转向 -->
   <global-results>
<result name="error" type="redirectAction">
<param name="actionName">processErrorMessage</param>
       <param name="error">${error}</param>
       </result>
       <result name="login">/login.jsp</result>
</global-results>

你可能感兴趣的:(Interceptor)