struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ian_d_stew...@bankone.com
Subject Re: newbiew Q: how to do redirect instead of forward
Date Thu, 05 Jun 2003 20:37:16 GMT


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
ian_d_stewart@bankone.com
(614) 213-6100




"Zhu He" <hez@cisco.com> on 06/05/2003 04:16:07 PM

Please respond to "Struts Users Mailing List"
      <struts-user@jakarta.apache.org>

To:   <struts-user@jakarta.apache.org>
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(RequestProcessor.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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message