tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@locus.apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/startup EmbededTomcat.java
Date Tue, 20 Jun 2000 00:17:48 GMT
costin      00/06/19 17:17:47

  Modified:    src/share/org/apache/jasper/runtime JspLoader12.java
                        JspServlet.java
               src/share/org/apache/tomcat/core ServletWrapper.java
               src/share/org/apache/tomcat/facade
                        RequestDispatcherImpl.java
               src/share/org/apache/tomcat/session
                        StandardSessionInterceptor.java
               src/share/org/apache/tomcat/startup EmbededTomcat.java
  Log:
  Fix a fix.
  
  Revision  Changes    Path
  1.4       +4 -0      jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader12.java
  
  Index: JspLoader12.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspLoader12.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- JspLoader12.java	2000/06/19 20:13:57	1.3
  +++ JspLoader12.java	2000/06/20 00:17:41	1.4
  @@ -165,10 +165,14 @@
   		});
   	    return b.booleanValue();
   	} catch( Exception ex ) {
  +	    if( ex instanceof PrivilegedActionException ) 
  +		ex=((PrivilegedActionException)ex).getException();
  +	    
   	    if( ex instanceof JasperException )
   		throw (JasperException)ex;
   	    if( ex instanceof FileNotFoundException )
   		throw (FileNotFoundException) ex;
  +	    ex.printStackTrace();
   	    throw new JasperException( ex );
   	}
       }
  
  
  
  1.30      +8 -3      jakarta-tomcat/src/share/org/apache/jasper/runtime/JspServlet.java
  
  Index: JspServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/jasper/runtime/JspServlet.java,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- JspServlet.java	2000/06/19 20:13:57	1.29
  +++ JspServlet.java	2000/06/20 00:17:41	1.30
  @@ -175,6 +175,7 @@
   		}
   
               } catch (FileNotFoundException ex) {
  +		ex.printStackTrace();
   		try {
   		    response.sendError(HttpServletResponse.SC_NOT_FOUND, 
   				       Constants.getString
  @@ -374,7 +375,6 @@
       {
   	try {
               String includeUri 
  -		//  = (String) request.getAttribute(Constants.INC_REQUEST_URI);
                   = (String) request.getAttribute(Constants.INC_SERVLET_PATH);
   
               String jspUri;
  @@ -384,12 +384,17 @@
               else
                   jspUri = includeUri;
   
  -	    //	    System.out.println("JspServletWrapper: " + includeUri + " " + jspUri );
  +//	    System.out.println("JspServletWrapper: " + includeUri + " " +
  +//                            jspUri + 
  +// 			       (String) request.getAttribute(
  +//                                  Constants.INC_REQUEST_URI));
  +
               boolean precompile = preCompile(request);
   
   	    Logger jasperLog = Constants.jasperLog;
   	    
  -            if (jasperLog != null && jasperLog.matchVerbosityLevel(Logger.INFORMATION))
  +            if (jasperLog != null &&
  +		jasperLog.matchVerbosityLevel(Logger.INFORMATION))
   		{
   		    jasperLog.log("JspEngine --> "+jspUri);
   		    jasperLog.log("\t     ServletPath: "+request.getServletPath());
  
  
  
  1.56      +9 -2      jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java
  
  Index: ServletWrapper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- ServletWrapper.java	2000/06/19 21:53:12	1.55
  +++ ServletWrapper.java	2000/06/20 00:17:43	1.56
  @@ -223,7 +223,8 @@
   	    }
   
   	    try {
  -		servlet.destroy();
  +		if( servlet!=null) 
  +		    servlet.destroy();
   	    } catch(Exception ex) {
   		// Should never come here...
   		context.log( "Error in destroy ", ex );
  @@ -326,7 +327,13 @@
   
   	// <servlet><jsp-file> case
   	if( path!=null ) {
  -	    req.setAttribute( "javax.servlet.include.request_uri", path );
  +	    if( path.startsWith("/"))
  +		req.setAttribute( "javax.servlet.include.request_uri",
  +				  req.getContext().getPath()  + path );
  +	    else
  +		req.setAttribute( "javax.servlet.include.request_uri",
  +				  req.getContext().getPath()  + "/" + path );
  +	    req.setAttribute( "javax.servlet.include.servlet_path", path );
   	}
   
   	if( unavailable!=null  ) {
  
  
  
  1.6       +3 -1      jakarta-tomcat/src/share/org/apache/tomcat/facade/RequestDispatcherImpl.java
  
  Index: RequestDispatcherImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/facade/RequestDispatcherImpl.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- RequestDispatcherImpl.java	2000/06/19 21:53:14	1.5
  +++ RequestDispatcherImpl.java	2000/06/20 00:17:44	1.6
  @@ -178,9 +178,11 @@
   	// not that this is a very particular case of forwarding
   	context.getContextManager().processRequest(realRequest);
   
  -	// unset "included" attribute if any - we may be in a servlet included from another servlet,
  +	// unset "included" attribute if any - we may be in a servlet
  +	// included from another servlet,
   	// in which case the attribute will create problems
   	realRequest.removeAttribute( "javax.servlet.include.request_uri");
  +	realRequest.removeAttribute( "javax.servlet.include.servlet_path");
   
   
   	// CM should have set the wrapper - call it
  
  
  
  1.4       +2 -1      jakarta-tomcat/src/share/org/apache/tomcat/session/StandardSessionInterceptor.java
  
  Index: StandardSessionInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/session/StandardSessionInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- StandardSessionInterceptor.java	2000/06/15 19:34:59	1.3
  +++ StandardSessionInterceptor.java	2000/06/20 00:17:45	1.4
  @@ -215,7 +215,8 @@
   	if( ctx.getDebug() > 0 ) ctx.log("Removing sessions from " + ctx );
   	StandardManager sm=getManager(ctx);
   	try {
  -	    sm.stop();
  +	    if( sm != null )
  +		sm.stop();
   	} catch(IllegalStateException ex ) {
   	    throw new TomcatException( ex );
   	}
  
  
  
  1.6       +3 -3      jakarta-tomcat/src/share/org/apache/tomcat/startup/EmbededTomcat.java
  
  Index: EmbededTomcat.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/EmbededTomcat.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- EmbededTomcat.java	2000/06/19 21:53:15	1.5
  +++ EmbededTomcat.java	2000/06/20 00:17:46	1.6
  @@ -296,7 +296,7 @@
   
   	PolicyInterceptor polI=new PolicyInterceptor();
   	addContextInterceptor( polI );
  -	//	polI.setDebug(20);
  +	polI.setDebug(20);
   
   	LoaderInterceptor loadI=new LoaderInterceptor();
   	addContextInterceptor( loadI );
  @@ -320,14 +320,14 @@
   
   	SimpleMapper1 mapI=new SimpleMapper1();
   	addRequestInterceptor( mapI );
  -	//	mapI.setDebug(10);
  +	mapI.setDebug(20);
   	
   	addRequestInterceptor( new StandardSessionInterceptor());
   	
   	// access control ( find if a resource have constraints )
   	AccessInterceptor accessI=new AccessInterceptor();
   	addRequestInterceptor( accessI );
  -	//	accessI.setDebug(20);
  +	accessI.setDebug(20);
   
   	// set context class loader
   	Jdk12Interceptor jdk12I=new Jdk12Interceptor();
  
  
  

Mime
View raw message