Sunday, November 21, 2004 04:32 AM
Like anything in Servlet stuff, there are different ways to do this.
In the case you described, I would do my initialisations in the reset() method.
This method is called before the JSP is displayed (or re-displayed).
Alternatively, if you like doing things in an execute() method, put your initialisation code in an new action.execute() which purpose is to put things in the request scope.
Just make sure that you use forward rather than redirect in your struts mapping (when you redirect, elements in the request scope are wipped out).
Not sure my explanation is clear as it is difficult to explain in a text, but I hope it gives you a kick.