tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core ApplicationDispatcher.java
Date Thu, 17 Jul 2003 11:56:41 GMT
remm        2003/07/17 04:56:40

  Modified:    catalina/src/share/org/apache/catalina/core
                        ApplicationDispatcher.java
  Log:
  - Fix error page forwarding (bug 21341).
  
  Revision  Changes    Path
  1.19      +19 -21    jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java
  
  Index: ApplicationDispatcher.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/core/ApplicationDispatcher.java,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- ApplicationDispatcher.java	10 Jun 2003 20:02:02 -0000	1.18
  +++ ApplicationDispatcher.java	17 Jul 2003 11:56:40 -0000	1.19
  @@ -498,28 +498,26 @@
        * @exception IOException if an input/output error occurs
        * @exception ServletException if a servlet error occurs
        */
  -    private void processRequest(ServletRequest request, ServletResponse response)
  -            throws IOException, ServletException {
  +    private void processRequest(ServletRequest request, 
  +                                ServletResponse response)
  +        throws IOException, ServletException {
                   
  -        if (request.getAttribute(ApplicationFilterFactory.DISPATCHER_TYPE_ATTR) != null){
  -            Integer disInt = 
  -                (Integer)request.getAttribute(
  -                    ApplicationFilterFactory.DISPATCHER_TYPE_ATTR);
  -
  +        Integer disInt = (Integer) request.getAttribute
  +            (ApplicationFilterFactory.DISPATCHER_TYPE_ATTR);
  +        if (disInt != null) {
               if (disInt.intValue() != ApplicationFilterFactory.ERROR) {
  -                outerRequest.setAttribute(
  -                    ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
  -                    origServletPath);
  -
  -                outerRequest.setAttribute(
  -                    ApplicationFilterFactory.DISPATCHER_TYPE_ATTR,
  -                        new Integer(ApplicationFilterFactory.FORWARD));
  -
  +                outerRequest.setAttribute
  +                    (ApplicationFilterFactory.DISPATCHER_REQUEST_PATH_ATTR,
  +                     origServletPath);
  +                outerRequest.setAttribute
  +                    (ApplicationFilterFactory.DISPATCHER_TYPE_ATTR,
  +                     new Integer(ApplicationFilterFactory.FORWARD));
                   invoke(outerRequest, response);
               } else {
  -                invoke(request, response);                  
  +                invoke(outerRequest, response);
               }
  -        }        
  +        }
  +
       }
       
       
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message