• Post Reply Bookmark Topic Watch Topic
  • New Topic

Does we need both global-forwards and forward in struts-config.xml

 
sai prasanna
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!