<
struts
>
<!-- 默认的视图主题 -->
< constant name = " struts.ui.theme " value = " simple " />
<!-- struts2在防止表单重复提交的拦截中有2个,分别是:token,tokenSession。tokenSession继承token而来。
通常情况下,使用tokenSession客户端感觉会比较友好。 -->
<!-- 如果重复提交,会跳转到error.jsp页面 -->
< package name = " person " namespace = " /test " extends = " struts-default " >
< action name = " token " class = " com.ljq.action.PersonAction " >
< interceptor - ref name = " defaultStack " />
< interceptor - ref name = " token " />
<!-- 如果重复提交,跳转到error.jsp页面 -->
< result name = " invalid.token " >/ WEB - INF / page / error.jsp </ result >
< result >/ WEB - INF / page / message.jsp </ result >
</ action >
< action name = " tokenSession " class = " com.ljq.action.PersonAction " >
< interceptor - ref name = " defaultStack " />
< interceptor - ref name = " tokenSession " />
<!-- 如果重复提交,不会跳转到error.jsp页面 -->
< result name = " invalid.token " >/ WEB - INF / page / error.jsp </ result >
< result >/ WEB - INF / page / message.jsp </ result >
</ action >
</ package >
</ struts >
<!-- 默认的视图主题 -->
< constant name = " struts.ui.theme " value = " simple " />
<!-- struts2在防止表单重复提交的拦截中有2个,分别是:token,tokenSession。tokenSession继承token而来。
通常情况下,使用tokenSession客户端感觉会比较友好。 -->
<!-- 如果重复提交,会跳转到error.jsp页面 -->
< package name = " person " namespace = " /test " extends = " struts-default " >
< action name = " token " class = " com.ljq.action.PersonAction " >
< interceptor - ref name = " defaultStack " />
< interceptor - ref name = " token " />
<!-- 如果重复提交,跳转到error.jsp页面 -->
< result name = " invalid.token " >/ WEB - INF / page / error.jsp </ result >
< result >/ WEB - INF / page / message.jsp </ result >
</ action >
< action name = " tokenSession " class = " com.ljq.action.PersonAction " >
< interceptor - ref name = " defaultStack " />
< interceptor - ref name = " tokenSession " />
<!-- 如果重复提交,不会跳转到error.jsp页面 -->
< result name = " invalid.token " >/ WEB - INF / page / error.jsp </ result >
< result >/ WEB - INF / page / message.jsp </ result >
</ action >
</ package >
</ struts >