Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic