日期:2014-05-20  浏览次数:20730 次

struts2 令牌问题
struts action 配制
  <action name="addGunRecipients" class="gunRecipientsAction" method="addGunRecipients">
<interceptor-ref name="token" />
<result name="invalid.token">
/jsp/errorJsp.jsp?url=gun/gunRecipientsList.action
</result>
<result name="success" type="redirectAction">
<param name="actionName">gunRecipientsList</param>
</result>
  </action>


<form name="pageForm" id="pageForm" method="post" action="<%=pagepath %>/gun/addGunRecipients.action" >
  <s:token name="token"></s:token>
  <input type="text" name="gunRecipients.receiveUserName" id="receiveUserName" value="" />
  <input class="btn" type="submit" value="确认领取"/>
</form>
没有加入时能新增成功
当我加入struts2 令牌 提交时他会将对象清空有没有用过的或者知道的请赐教下谢谢

------解决方案--------------------
探讨

引用:
<action name="addGunRecipients" class="gunRecipientsAction" method="addGunRecipients">
<interceptor-ref name="token" />
<result name="invalid.token">
/jsp/errorJsp.jsp?url=g……