Does we need both global-forwards and forward in struts-config.xml
Joined: May 02, 2005
hi all Does we need both <global-forwards> and <forward> in struts-config.xml and what does each each element mean
thanks in advance sai prasanna
Joined: Feb 15, 2005
The difference is that a global forward can be found from any action and always forwards to the same jsp, whereas a local forward name means something different for each action, and can forward to different Jsps.
For example, a global forward of "error" always goes to the same jsp (error.jsp for example), but a local forward of "success" only applies to a single specific acion. You could have 5 actions, each with a local forward of "success" and each would forward to 5 separate JSPs.