当前位置: 代码迷 >> J2EE >> 关于struts2中token本身提交到自身时的小麻烦
  详细解决方案

关于struts2中token本身提交到自身时的小麻烦

热度:89   发布时间:2016-04-17 23:27:51.0
关于struts2中token自身提交到自身时的小麻烦
我将token的interceptor-ref写到了表单提交的action里面了,这样的话我发现,正常第一遍的登录都没法登录进去了

<!-- 用户登录 -->
         <action name="login" class="AdmininfoAction" method="login">
            <!--  <interceptor-ref name="defaultStack"></interceptor-ref>
             <interceptor-ref name="token"></interceptor-ref>
             <result name="invalid.token">/admin/login.jsp</result> -->
             <result name="adminIndex">/admin/index.jsp</result>
             <result name="adminLogin">/admin/login.jsp</result>
             <result name="input" >/admin/login.jsp</result>
         </action>

但是我还想在一个action中写,请问有解决的办法吗?
------解决思路----------------------
判断第一次带了token来没有就是
  相关解决方案