首先在struts配置文件中加入以下代码: <action name="fund_audit" class="com.gsww.faimis.web.action.fund.FundAction" method="audit"> <interceptor-ref name="token"/> <interceptor-ref name="params"/> <result name="success_region" type="redirect">/finance/fund/region_audit_list.jsp</result> <result name="invalid.token">/finance/fund/region_audit_list.jsp</result> </action> 其中<interceptor-ref name="token"/>和<interceptor-ref name="params"/>是两个拦截器的配置,目的是为了接收页面传入 的token令牌及参数,<result name="invalid.token">/finance/fund/region_audit_list.jsp</result>指当发现重复提交时,需 要流转到的页面。 然后在JSP页面头部中加入<%@ taglib prefix="s" uri="/struts-tags" %>引入struts标签库 最后在JSP页面<form></form>中加入这一行:<s:token/>,产生token令牌,提交到Action进行验