Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Struts and the fly likes difference between global action forward and local action forward Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "difference between global action forward and local action forward" Watch "difference between global action forward and local action forward" New topic
Author

difference between global action forward and local action forward

saikrishna cinux
Ranch Hand

Joined: Apr 16, 2005
Posts: 689
can any one please tell me the difference between global action forward and local action forward in simple words


and when to use both action forward mapppings

thanking you


A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4
Daniel Dalton
Ranch Hand

Joined: Mar 20, 2005
Posts: 146
You can use a global ActionForward from any Action class, whereas a local one may only be used from the associated Action class.

You'd use a global ActionForward where it makes sense to do so - in other words, if you need to forward to the same thing from lots of Actions, use a global one.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
For example, you might have a global forward named "error". Then in your action class you could forward to this error every time you encountered an unhandled exception.

- Brent
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: difference between global action forward and local action forward