tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lar...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/facade RequestDispatcherImpl.java
Date Thu, 09 Nov 2000 13:27:36 GMT
larryi      00/11/09 05:27:36

  Modified:    src/share/org/apache/tomcat/facade Tag: tomcat_32
                        RequestDispatcherImpl.java
  Log:
  Since ServletWrapper's service() method can now throw exceptions, we
  need to catch these exceptions in include() so the request can be restored.
  Then rethrow the exception.
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.4   +15 -1     jakarta-tomcat/src/share/org/apache/tomcat/facade/Attic/RequestDispatcherImpl.java
  
  Index: RequestDispatcherImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/facade/Attic/RequestDispatcherImpl.java,v
  retrieving revision 1.8.2.3
  retrieving revision 1.8.2.4
  diff -u -r1.8.2.3 -r1.8.2.4
  --- RequestDispatcherImpl.java	2000/11/07 03:16:48	1.8.2.3
  +++ RequestDispatcherImpl.java	2000/11/09 13:27:36	1.8.2.4
  @@ -318,7 +318,14 @@
   	// for the realRequest ( since the real request will still have the
   	// original handler/wrapper )
   	ServletWrapper wr=subRequest.getWrapper();
  -	if( wr!=null ) wr.service(realRequest, realResponse);
  +	Throwable t = null;
  +	if( wr!=null ) {
  +	    try {
  +		wr.service(realRequest, realResponse);
  +	    } catch (Throwable t1) {
  +		t = t1;
  +	    }
  +	}
   
   	// After request, we want to restore the include attributes - for
   	// chained includes.
  @@ -339,6 +346,13 @@
   	// revert to the response behavior
   	if( ! old_included ) {
   	    realResponse.setIncluded( false );
  +	}
  +
  +	if (t != null) {
  +	    if (t instanceof IOException)
  +		throw (IOException) t;
  +	    else if (t instanceof ServletException)
  +		throw (ServletException) t;
   	}
       }
   
  
  
  

Mime
View raw message