I know in struts one can forward from one action to another like shown here but is there a way I can check in my one action and see if certain link exists if it doesn't than redirect to another action, simple example would help. Thanks
Asked
Active
Viewed 879 times
1
-
The question is not clear. You can forward from an Action to a JSP, redirect from an Action to another Action, or chain multiple Actions... what are you trying to do ? What are the links you are talking about ? – Andrea Ligios Oct 29 '12 at 16:31
-
1If a certain *link* exists? Actions are ignorant of the view layer; they know only about the data they provide to the view layer. You can redirect to arbitrary actions by returning different results, or by putting the action name in a variable and using that as the redirect location, although this is somewhat brittle. – Dave Newton Oct 29 '12 at 16:32
-
Thanks guys. what I am trying to do is if certain page doesn't exist for mobile browser than get out of mobile template and direct it to full version of desktop page – user1617247 Oct 29 '12 at 16:53