aspose file tools*
The moose likes Struts and the fly likes sendRedirect Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "sendRedirect" Watch "sendRedirect" New topic
Author

sendRedirect

Madhu Sudhana
Ranch Hand

Joined: Apr 16, 2006
Posts: 127
How can we replace the
response.sendRedirect("abc.jsp");
in struts?


"And the trouble is, if you don't risk anything, you risk even more." -- Erica Jong.
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
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.


Merrill
Consultant, Sima Solutions
Madhu Sudhana
Ranch Hand

Joined: Apr 16, 2006
Posts: 127
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

Joined: Feb 15, 2005
Posts: 4864
In this case, create a global forward as I mentioned above, and in your JSP, use the <logic:forward> tag.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sendRedirect