File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Spring in Action this week in the Spring 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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: forwarding request to an action from a jsp page