質問

How to rename the Struts2 Token Parameters?

if we use <s:token/> tag while form submit by default Struts2 will generate URL something like this

?name=name&struts.token.name=struts.token&struts.token=8E1USQZ5LHG120FU4YUZJAMPOUT4OVP3

by using this <s:token name="suid"/> tag we can rename the "struts.token" parameter. Struts2 will generate URL something like this

?name=name&struts.token.name=suid&suid=8E1USQZ5LHG120FU4YUZJAMPOUT4OVP3

How can we rename the "struts.token.name" parameter?

役に立ちましたか?

解決

The parameter is used by the TokenHelper. There no extension points are given for this bean. You can provide your own implementation by extending token interceptors and overriding their methods only and replace references of token helper inside them.

You should check this links:

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top