struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig R. McClanahan" <Craig.McClana...@eng.sun.com>
Subject Re: Forward vs. Redirect
Date Tue, 26 Sep 2000 23:49:10 GMT
"Jones, Dean" wrote:

>
>
>      [Jones, Dean] Craig,The change is simple,
>      ActionServlet.java in processActionPerform()
>              // Obey any returned ActionForward
>              if (forward != null) {
>                  String path = forward.getPath();
>                  if (forward.getRedirect()) {
>                      if(path.charAt(0) == '/') {
>                              String send =
>      request.getContextPath() + path;      // THIS FIXES THE
>      PROBLEM
>                              response.sendRedirect(send);
>                      }
>                      else {
>                              response.sendRedirect(path);
>                      }
>                  }
>                  else {
>                      RequestDispatcher rd =
>
>      getServletContext().getRequestDispatcher(path);
>                      rd.forward(request, response);
>                  }
>              }I never really worked on an Open Source project
>      before.  I guess I should brush up on the processes
>      andprocedures really.  How do I get started in this ???
>       Dean S Jones
>

I think you just got involved :-).  I've applied this patch on both the
0.5 and 1.0 code paths, so it will be included if we do a 0.5.1 release
(I want to wait a few days in case anything else that should be fixed
comes in).

The general policies for Jakarta project involvement (different open
source projects vary somewhat in the details) are described on the
Jakarta web site
<http://jakarta.apache.org/getinvolved/getinvolvedindex.html>.  Usually,
posting the changes as a "diff" file is the preferred mechanism, because
it makes crystal clear which lines need to be changed.  For something
this focused, highlighting the change as you did above is fine.

Thanks (for the good idea and for the patch)!

Craig

====================
See you at ApacheCon Europe <http://www.apachecon.com>!
Session VS01 (23-Oct 13h00-17h00):  Sun Technical Briefing
Session T06  (24-Oct 14h00-15h00):  Migrating Apache JServ
                                    Applications to Tomcat


Mime
View raw message