This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Global Forwards

 
Sathy thyagaraj
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
what is the Global Forwards in struts
Can you explain it with example?

thanks
 
Joan Horta Tosas
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll explain it supposing you know what a "not-global-forward" is in Struts. When you're in an Action, the execute method returns an ActionForward, which are normally declared within an action-mapping scope. The Action then, using the mapping object, returns one of its defined forwards... But you can also create global-forwards, that are accessible from every Action. For example, you can define a global forward to the login page, so you can "send" the user to the login page from everywhere in the app without having to define the same forward in every action mapping. Hope you understood it.
 
Sathy thyagaraj
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you Joan.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic