日期:2014-05-19 浏览次数:20728 次
<?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="default" extends="struts-default" namespace="/">
<!--
定义拦截器验证用户是否已经登录登陆后方可访问
-->
<interceptors>
<interceptor name="checkLogin" class="com.chaoshi.no21.actions.Interceptor.checkLoginInterceptor">
</interceptor>
</interceptors>
<!--
顶一个默认的Action方法。如果没找到对应的action则执行这个NotFound action
--><default-action-ref name="notFound" />
<!--
定义全局结果集 login 返回登录界面
-->
<global-results>
<result name="login">/WEB-INF/packages/login.jsp</result>
</global-results><!--
防止用户乱输入网址发生异常的action
--><action name="notFound">
<result>/WEB-INF/packages/login.jsp</result>
</action><!--
登录action
--><action name="Login" class="com.chaoshi.no21.actions.LoginAction">
<result name="success">/WEB-INF/packages/menu.jsp</result>
</action>
</package>
<package name="itmeAction" extends="struts-default" namespace="/">
<action name="item_*" class="com.chaoshi.no21.actions.ItemAction" method="{1}">
<result name="add">/WEB-INF/packages/itemAdd.jsp </result>
<result name="update">/WEB-INF/packages/itemModify.jsp</result>
<interceptor-ref name="defaultStack"></interceptor-ref>
<interceptor-ref name="checkLogin"></interceptor-ref>
</action>
</package>
<package name="link" namespace="/" extends="struts-default">
<action name="category_*" class="com.chaoshi.no21.actions.CategorryAction" method="{1}">
<result name="add">/WEB-INF/packages/categoryAdd.jsp</result>
<result name="update">/WEB-INF/packages/categoryModify.jsp</result>
</action>
</package>
</struts>
<package name="default" extends="struts-default" namespace="/">
<!--
定义拦截器验证用户是否已经登录登陆后方可访问
-->
<interceptors>
&n