开发者

STRUTS2 - Value stack values are passed in URL!

开发者 https://www.devze.com 2023-02-05 13:49 出处:网络
I need a solution to hide or encode the \"Value Stack\" Values in URL. The \'Value stack\' values shows in URL if in struts.xml file the result was a jsp:

I need a solution to hide or encode the "Value Stack" Values in URL.

The 'Value stack' values shows in URL if in struts.xml file the result was a jsp: example

 <action name="actionName" class="ActionClass">
      <result name="resultReturned">page.jsp</result>
    </action>

I found 1 solution. 1) when we redirect to another ACTION, the values doesn't show in url. Example:

 <action...>
    <result name="resultReturned" type="redir开发者_如何学运维ectAction">ActionNameX</result>
    ..
    </action>

<action name="ActionNameX" >
...
</action>

Is there any other solution?

Thank you !


You mean your form values are passed in the URL? Which in turn are set on the action and then become part of the value stack... Just use a plain html form with method="POST" although remember that hiding the URL values can make book marking difficult and really just makes you feel better, there is nothing more secure about it perhaps less as it may lull you into a false sense of security.

0

精彩评论

暂无评论...
验证码 换一张
取 消