Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

forwarding request to an action from a jsp page

 
sandy sean
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 485
Eclipse IDE Firefox Browser Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic