This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Struts and the fly likes forwarding request to an action from a jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "forwarding request to an action from a jsp page" Watch "forwarding request to an action from a jsp page" New topic
Author

forwarding request to an action from a jsp page

sandy sean
Ranch Hand

Joined: Dec 30, 2010
Posts: 69
consider this sequence please:

Action1------------->view.jsp--------------->action2

1)How to forward request to an action from jsp in struts2?? in jsp we have jsp:forward but what is struts2 equivalent?

2)from action1 i am passing some object to view jsp in request scope. i want same object get passed to action2. how to put an object in some scope within the jsp using struts2 tags or OGNL??

thanks...
Mohana Rao Sv
Ranch Hand

Joined: Aug 01, 2007
Posts: 485

1)How to forward request to an action from jsp in struts2?? in jsp we have jsp:forward but what is struts2 equivalent?
Call the action whatever you want from jsp.
No, it's not forward it's high level you can make action.
Servlets jsp:forware struts2 resultType= redirectAction


2)from action1 i am passing some object to view jsp in request scope. i want same object get passed to action2. how to put an object in some scope within the jsp using struts2 tags or OGNL??

if you want to copy the objects in action1 to action2 you can use chainInterceptor. This interceptor will take care of copying values.


ocjp 6 — Feeding a person with food is a great thing in this world. Feeding the same person by transferring the knowledge is far more better thing. The reason is the amount of satisfaction which we get through food is of only one minute or two. But the satisfaction which we can get through the knowledge is of life long.
 
 
subject: forwarding request to an action from a jsp page
 
Similar Threads
does a new action context created for every new action in struts2
Communication between Actions classes
putting a value in request scope in struts2 from jsp
Struts2 : Problem in redirecting From other site to myApplication
Struts2 wizard with scoped model driven