Hello Merrill, Thanks for your reply . I did check the site that you have so kindly pointed me to .
Couple of more questions come to mind :
Is the creation of a new ActionForward related to maintaining the request ? ie when I create a new ActionForward - will the struts framework actually do a RequestDespatcher.forward ? ( thereby maintaining my httpRequest ) and - when I just simply do a mapping.findForward does that mean - that it actually does a response.sendRedirect ( new request )
Thanks for your answers - just wanted to confirm my understanding
Joined: Feb 15, 2005
In the Struts architecture, when any action is called (e.g. MyAction.do) it's the Struts ActionServlet that is actually being called. This servlet then reads the struts-config.xml file and calls the execute() method on the appropriate Action class. When the execute() method you write terminates, it must return an instance of ActionForward to the Struts ActionServlet.
When ActionServlet receives this object, it then performs a RequestDispatcher.forward() to the appropriate jsp defined by the ActionFoward. The mapping.findForward() method does nothing more than instantiate an ActionForward class from the name given in the struts-config.xml file. It's the Struts ActionServlet that does the forwarding using the information you pass back to it in the form of an ActionForward instance.
I hope this helps. Good luck.
[ March 09, 2005: Message edited by: Merrill Higginson ] [ March 09, 2005: Message edited by: Merrill Higginson ]