Redirect action to another action struts.xml
:
<action name="CheckLogin" class="LoginS" method="checkLogin">
<result name="input" type="redirectAction">
<param name="actionName">SectorDisplay</param>
<param name="branch_id">${branch_id}</param>
</result>
</action>
parametes is sent as branch_id
but its on url
and it shows like
http://localhost:8085/Display/SectorDisplay.action?branch_id=110
I think its not as POST, its GET.
I do not want to show param on URL, is there any way to hide it or how can I post it to action?
Thank you..
With redirection you can only pass GET
parameters. You can use action chaining as an alternative.
Check these posts for details:
Can you do a struts2 action redirect using POST instead of GET?
Struts 1 redirect from action to action with parameters as POST request
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With