b) plus the addressbar doesn't change. this sometimes causes problem, for example starting from a fowarded page, you go to another webpage, then go back you will not get the same page.
Zhu ----- Original Message ----- From: "Brandon Goodin" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Thursday, June 05, 2003 4:48 PM Subject: RE: newbiew Q: how to do redirect instead of forward > 1) You need to set your forward redirect="(true|false)" in your > struts-config.xml for that particular action mapping. > 2) The difference... > a) "redirect" generates a whole new request by sending a header back to the > client you lose all of your request scope data. > b) "forward" continues with the same request and arrives at the view with > request object intact. > > RequestDispatcher vs response.redirect(); > > Brandon Goodin > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Thursday, June 05, 2003 2: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] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

