I have to pass some parameter from an action to another action,for example to keep trace of an event.
What is the best way to do that?
I would not use session parameters. Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Assuming you are serverside within one action and wishing to invoke another action with some parameters.
You can use the s:action tag to invoke another action, possibly with additional/other parameters than the original action:
You can also use a standard struts-xml result type with a parameter:
If you want a client side redirect you have to send an url back to the client with the proper parameters, and maybe use some javascript to go there.