In struts the action scope was defined as
<action scope="session" .../>
How do you set the scope in Struts2?
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.
There isn’t really a direct equivalent in struts2. In struts1, that scope referred to the associated ActionForm.
Typically if you wanted to do something similar you’d create a session scoped bean either through spring, guice or struts2 configuration, and inject it into your action.
Or you could implement SessionAware, and manage the properties that you want to be session backed yourself.