Hi I have something like this in struts.xml
<action name="LoginAction" class="controller.LoginAction">
<result name="error">/Error.jsp</result>
<result name="success">/Wizard.jsp</result>
</action>
Edited:
Upon successful execution of execute in the action the next page has data which it accesses using the request scope. How can i store the same data in session scope instead?
I read that HttpServletRequest object is passed as a parameter to the execute() method in a Struts action, and I can always retrieve the HttpSession object by using the request.getSession() and attaching data to it.
So if I am using something like this in controller.LoginAction
public String execute(HttpServletRequest req) {
...
}
Do I have to change struts.xml? execute does not get called when HttpServletRequest is added as a parameter.
<action name="LoginAction" class="controller.LoginAction">
<result name="error">/Error.jsp</result>
<result name="success">/Wizard.jsp</result>
</action>
Also is using session this way the best method ? I am trying to familiarize my self with the struts method.