首页 > 代码库 > 拦截器

拦截器


	<!-- 拦截器 -->
	<package name="myPackage" namespace="/" extends="struts-default">
		<interceptors>
			<interceptor name="LoginInterceptor"
				class="biz.cld.framework.interceptor.LoginInterceptor" />
			<interceptor-stack name="myStack">
				<interceptor-ref name="defaultStack" />
				 <!--调用自定义拦截器 -->
				<interceptor-ref name="LoginInterceptor" />
			</interceptor-stack>
		</interceptors>
		<default-interceptor-ref name="myStack" />
		<global-results>
			<result name="login">/EC/user/userLogin.jsp</result>
		</global-results>
	</package>



<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
    "http://struts.apache.org/dtds/struts-2.0.dtd">

<struts>
	<package name="User" extends="myPackage" namespace="/EC">