When you redirect, the RequestDispatcher tells the browser to request another URL. When this happens there is always a round trip to the client side and the previous Request and Response objects are lost. Also, redirect allows you to request a resource outside the current application.
In a forward, the request is done w/o the help of the client browser. Also, the Request and Response objects are kept. Jimmy -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, June 05, 2003 4:37 PM To: Struts Users Mailing List Subject: Re: newbiew Q: how to do redirect instead of forward This is probably a silly question, but what's the difference between forward and redirect? Thanx, Ian Ian D. Stewart Open Systems Engineer II Enterprise Midrange - Bank One Infrastructure & Operations [EMAIL PROTECTED] (614) 213-6100 "Zhu He" <[EMAIL PROTECTED]> on 06/05/2003 04:16:07 PM Please respond to "Struts Users Mailing List" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> cc: Subject: newbiew Q: how to do redirect instead of forward for forward we usually do execute() { ... return mapping.findForward("listing"); } I tried to use redirect by execute() { ActionForward af = mapping.findForward("listing"); af.setRedirect(true); return af; } but get exception javax.servlet.ServletException: Configuration is frozen at org.apache.struts.action.RequestProcessor.processException(RequestProcessor. java:541) at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProces sor.java:482) at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1420) This transmission may contain information that is privileged, confidential and/or exempt from disclosure under applicable law. If you are not the intended recipient, you are hereby notified that any disclosure, copying, distribution, or use of the information contained herein (including any reliance thereon) is STRICTLY PROHIBITED. If you received this transmission in error, please immediately contact the sender and destroy the material in its entirety, whether in electronic or hard copy format. Thank you. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]