struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chenlin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (WW-4251) S:token does not generate any hidden value
Date Thu, 05 Dec 2013 02:43:36 GMT

    [ https://issues.apache.org/jira/browse/WW-4251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13839727#comment-13839727
] 

chenlin commented on WW-4251:
-----------------------------

HI Lenart,

JSP:

<s:form action="submitPrefernce" id="submitPrefernceId" >
<s:token></s:token>
<table width="99.7%" >
		<tr>
....
....
</s:form>

Struts.xml

Add following interceptor into action which will validate token.
 <interceptor-ref name="token"/>

> S:token does not generate any hidden value
> ------------------------------------------
>
>                 Key: WW-4251
>                 URL: https://issues.apache.org/jira/browse/WW-4251
>             Project: Struts 2
>          Issue Type: Bug
>          Components: Core Interceptors, Plugin - Tags
>    Affects Versions: 2.3.15.1
>         Environment: IBM AIX 6.1.0.0
> Websphere Application server 7.0.0.21
> Websphere Portal server 7.0.0.2
>            Reporter: chenlin
>              Labels: Struts2, Token
>             Fix For: 2.3.17
>
>   Original Estimate: 96h
>  Remaining Estimate: 96h
>
> Sometimes the "S:token" tag cannot generate hidden value on JSP which cause all form
failed which have add token interceptor validation. Please advice if there is any particular
scenario which will cause this issue
> Wrong:
> <FORM id=submitPrefernceId name=submitPrefernceId action=/wps/myportal/XXXXX method=post
autocomplete="off">
> <INPUT type=hidden name=""> 
> <INPUT type=hidden name="">
>  
> Correct : 
> <FORM id=submitPrefernceId name=submitPrefernceId action=/wps/myportal/XXXX method=post
autocomplete="off">
> <INPUT type=hidden value=token name=struts.token.name> 
> <INPUT type=hidden value=2OMLV0WXN1QGPN9BVBYEB8Z9NHLF3RDI name=token>



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Mime
View raw message