jar包:struts2-core-2.1.8.jar,xwork-core-2.1.6.jar 
小弟在测试token拦截器时发现怎么配都有问题,故特来求教,先谢了! 第一种方式: 
struts.xml 
<package name="actionTwo" namespace="/" extends="struts-default">  
      
        <global-results>   
            <result name="invalid.token" >/s2Page/repeatSubmitTest.jsp</result> 
        </global-results> 
        
        <action name="money_*"  method="{1}" class="web.action.ShowMeTheMoney" > 
          <result name="destination">/s2Page/HelloWorld.jsp</result> 
          <result name="success">/s2Page/Hello.jsp</result> 
        </action>         <action name="s2Action" class="web.action.Struts2Action"> 
      <interceptor-ref name="token"/>   
      <interceptor-ref name="defaultStack" />  
               <result name="success" type="redirectAction"> 
          <param name="namespace">/</param> 
    <param name="actionName">money_gotoThePage</param> 
               </result> 
          
        </action> 
        
</package> 提交请求页面jsp: 
<s:form action="s2Action" namespace="/" method="post"> 
    <s:token name="token"></s:token>    
    <s:submit value="s2Action, goto struts2 page!"></s:submit> 
</s:form> 提示页面repeatSubmit.jsp: 
<div class="div_center">   
      <span class="waring">   
        <font size="5" color="red">您已经成功提交,请不要重复提交!</font>   
    </span>   
</div>  
<s:actionerror/> 现象: 
第一次点击按钮提交可以正常跳转,后退后再次提交成功跳转到提示重复提交的页面但是<s:actionerror/>没有显示控制台的警告信息,后退刷新后能够再次正常跳转. 
问题: 
1,为什么<s:actionerror/>没有显示控制台的警告信息? 
2,为什么刷新后能再次跳转呢? 第二种 
struts.xml 
<package name="actionTwo" namespace="/" extends="struts-default">  
      <interceptors> 
      <interceptor-stack name="myStack">  
      <!--引用struts2默认定义token拦截器解决重复提交 --> 
      <interceptor-ref name="token"/>   
      <interceptor-ref name="defaultStack" />        
      </interceptor-stack>  
  </interceptors> 
      <default-interceptor-ref name="myStack" />   
      
      <global-results>   
            <result name="invalid.token" >/s2Page/repeatSubmitTest.jsp</result> 
        </global-results> 
        
        <action name="money_*"  method="{1}" class="web.action.ShowMeTheMoney" > 
          <result name="destination">/s2Page/HelloWorld.jsp</result> 
          <result name="success">/s2Page/Hello.jsp</result> 
        </action> 
        <action name="s2Action" class="web.action.Struts2Action"> 
            
          <result name="success" type="redirectAction"> 
          <param name="namespace">/</param> 
    <param name="actionName">money_gotoThePage</param> 
          </result> 
          
        </action> 
        
    </package> jsp页面code不变 
现象: 
点击按钮提交后直接跳转到提示重复提交的页面,<s:actionerror/>有显示信息"•The form has already been processed or no token was supplied, please try again.",但是控制台显示"警告: Could not find token name in params." 
问题: 
为什么会显示找不到token name 明明我jsp页面有<s:token name="token"></s:token>且看源代码上面已经有了相应的内容<input type="hidden" name="struts.token.name" value="token" /> 
<input type="hidden" name="token" value="3Q8EPW8B4U5MO3ZF8PX7P5UO5AUABPPN" />