This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply 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: 62
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.
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: forwarding request to an action from a jsp page
 
Similar Threads
does a new action context created for every new action in struts2
Struts2 wizard with scoped model driven
Communication between Actions classes
putting a value in request scope in struts2 from jsp
Struts2 : Problem in redirecting From other site to myApplication