• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sendRedirect

 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How can we replace the
response.sendRedirect("abc.jsp");
in struts?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In your struts-config.xml file, create a forward (either global or local) for abc.jsp and in that forward specify redirect="true". Then, when you return this forward from the execute method of a Struts Action, the response.sendRedirect will be performed by Struts.
 
Madhu Sudhana
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually my requiremnt is
I have to navigate from
one jsp to another jsp

by avoiding response.sendRedirect

how can I do that?
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In this case, create a global forward as I mentioned above, and in your JSP, use the <logic:forward> tag.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic