日期:2014-05-17 浏览次数:20749 次
<package name="order" extends="authInterceptor" namespace="/order">
<!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN" "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts> <package name="authInterceptor" extends="base-struts-json"> <!-- 自定义拦截器,实现用户校验 --> <interceptors> <interceptor name="authInterceptor" class="cn.sccl.web.action.usercenter.AuthInterceptor"></interceptor> <interceptor-stack name="mydefaultStack"> <interceptor-ref name="authInterceptor"></interceptor-ref> <interceptor-ref name="defaultStack"></interceptor-ref> </interceptor-stack> </interceptors> <default-interceptor-ref name="mydefaultStack"/> </package> </struts>
<struts> <include file="struts-plugin.xml" /> <package name="base-struts-json" extends="menu"> <!-- 全局逻辑视图 --> <global-results> <result name="relogin">/WEB-INF/relogin.jsp</result> <result name="error_validate">/WEB-INF/jsp/usercenter/user_validate.jsp</result> <result name="sysException">/common/exception/sysexception.jsp</result> <result name="exception">/common/exception/abnormalTip.jsp</result> </global-results> <!-- 自定义异常 --> <global-exception-mappings> <exception-mapping exception="cn.sccl.common.exception.SystemException" result="sysException" /> <exception-mapping exception="java.lang.Exception" result="exception" /> </global-exception-mappings> </package> </struts>
<struts> <package name="menu" extends="json-default"> <!-- 自定义拦截器,快速导航 --> <interceptors> <interceptor name="menu" class="cn.sccl.web.action.usercenter.menuInterceptor"></interceptor> <interceptor-stack name="mydefaultStack"> <interceptor-ref name="menu"></interceptor-ref> <interceptor-ref name="defaultStack"></interceptor-ref> </interceptor-stack> </interceptors> <default-interceptor-ref name="mydefaultStack"/> </package> </struts>