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/facade ServletInputStreamFacade.java
Date Sat, 29 Jul 2000 01:35:18 GMT
costin      00/07/28 18:35:18

  Modified:    src/share/org/apache/tomcat/core RequestInterceptor.java
                        ServletWrapper.java
               src/share/org/apache/tomcat/depend DependClassLoader.java
                        DependManager.java
               src/share/org/apache/tomcat/facade
                        ServletInputStreamFacade.java
  Log:
  - small cleanup - reset debug to 0, remove unused code and interfaces.
  
  Revision  Changes    Path
  1.12      +3 -4      jakarta-tomcat/src/share/org/apache/tomcat/core/RequestInterceptor.java
  
  Index: RequestInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestInterceptor.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- RequestInterceptor.java	2000/06/22 19:49:36	1.11
  +++ RequestInterceptor.java	2000/07/29 01:35:11	1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestInterceptor.java,v
1.11 2000/06/22 19:49:36 costin Exp $
  - * $Revision: 1.11 $
  - * $Date: 2000/06/22 19:49:36 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestInterceptor.java,v
1.12 2000/07/29 01:35:11 costin Exp $
  + * $Revision: 1.12 $
  + * $Date: 2000/07/29 01:35:11 $
    *
    * ====================================================================
    *
  @@ -63,7 +63,6 @@
   
   
   package org.apache.tomcat.core;
  -import javax.servlet.Servlet;
   import java.util.*;
   
   /**
  
  
  
  1.66      +1 -70     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.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- ServletWrapper.java	2000/07/28 17:21:34	1.65
  +++ ServletWrapper.java	2000/07/29 01:35:11	1.66
  @@ -197,12 +197,10 @@
        */
       public void addSecurityMapping( String name, String role,
   				    String description ) {
  -// 	System.out.println("Adding role:  " + name + " " + role + " " + securityRoleRefs +
" " + this);
   	securityRoleRefs.put( name, role );
       }
   
       public String getSecurityRole( String name ) {
  -// 	System.out.println("Role: " + name + " "  +securityRoleRefs.get(name) + " " + securityRoleRefs
+ " " + this);
   	return (String)securityRoleRefs.get( name );
       }
   
  @@ -343,13 +341,6 @@
       */
       public void service(Request req, Response res) 
       {
  -// 	try {
  -// 	    handleReload(req);
  -// 	} catch( TomcatException ex ) {
  -// 	    // what to do ?
  -// 	    log("in handleReload request=" + req, ex);
  -// 	}
  -
   	// <servlet><jsp-file> case
   	if( path!=null ) {
   	    if( path.startsWith("/"))
  @@ -389,58 +380,8 @@
   	}
       }
   
  -    // -------------------- Reloading --------------------
  -
  -    // XXX Move it to interceptor - so it can be customized
  -    // Reloading
  -    // XXX ugly - should find a better way to deal with invoker
  -    // The problem is that we are just clearing up invoker, not
  -    // the class loaded by invoker.
  -    void handleReload(Request req) throws TomcatException {
  -	// That will be reolved after we reset the context - and many
  -	// other conflicts.
  -	if( isReloadable ) {// && ! "invoker".equals( getServletName())) {
  -// 	    ServletLoader loader=context.getServletLoader();
  -// 	    if( loader!=null) {
  -		// XXX no need to check after we remove the old loader
  -		if( context.shouldReload() ) {
  -		    // workaround for destroy 
  -		    try {
  -			destroy();
  -		    } catch(Exception ex ) {
  -			log( "Error in destroy ", ex );
  -		    }
  -		    initialized=false;
  -		    context.reload();
  -		    
  -		    ContextManager cm=context.getContextManager();
  -		    cm.doReload( req, context );
  -		    
  -		    servlet=null;
  -		    servletClass=null;
  -		    /* Initial attempt to shut down the context and sessions.
  -		       
  -		       String path=context.getPath();
  -		       String docBase=context.getDocBase();
  -		       // XXX all other properties need to be saved
  -		       // or something else
  -		       ContextManager cm=context.getContextManager();
  -		       cm.removeContext(path);
  -		       Context ctx=new Context();
  -		       ctx.setPath( path );
  -		       ctx.setDocBase( docBase );
  -		       cm.addContext( ctx );
  -		       context=ctx;
  -		       // XXX shut down context, remove sessions, etc
  -		    */
  -		}
  -		//	}
  -	}
  -    }
  -
  -
       // -------------------- Jsp hooks
  -        // <servlet><jsp-file> case - we know it's a jsp
  +    // <servlet><jsp-file> case - we know it's a jsp
       void handleJspInit() {
   	// XXX Jsp Servlet is initialized, the servlet is not generated -
   	// we can't hook in! It's jspServet that has to pass the config -
  @@ -496,15 +437,5 @@
   			       HttpServletResponse.SC_SERVICE_UNAVAILABLE );
   	return;
       }
  -
  -
  -    // -------------------- Not found
  -    private void handleNotFound( Request req, Response res) {
  -	log( "Can't find servet " + getServletName() + " " +
  -		     getServletClass() );
  -	res.setStatus( 404 );
  -	contextM.handleStatus( req, res,  404 );
  -    }
  -
   
   }
  
  
  
  1.2       +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/depend/DependClassLoader.java
  
  Index: DependClassLoader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/depend/DependClassLoader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DependClassLoader.java	2000/07/27 23:08:19	1.1
  +++ DependClassLoader.java	2000/07/29 01:35:13	1.2
  @@ -83,7 +83,7 @@
    */
   public class DependClassLoader extends ClassLoader {
       protected ClassLoader parent;
  -    final static int debug=10;
  +    final static int debug=0;
       DependManager dependM;
   
       public DependClassLoader( DependManager depM, ClassLoader parent ) {
  
  
  
  1.2       +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/depend/DependManager.java
  
  Index: DependManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/depend/DependManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DependManager.java	2000/07/27 23:08:19	1.1
  +++ DependManager.java	2000/07/29 01:35:13	1.2
  @@ -152,7 +152,7 @@
       
       // -------------------- Private 
   
  -    private static final int debug=10;
  +    private static final int debug=0;
       
       void log( String s ) {
   	System.out.println("DependManager: " + s );
  
  
  
  1.2       +5 -0      jakarta-tomcat/src/share/org/apache/tomcat/facade/ServletInputStreamFacade.java
  
  Index: ServletInputStreamFacade.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/facade/ServletInputStreamFacade.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletInputStreamFacade.java	2000/05/30 14:08:23	1.1
  +++ ServletInputStreamFacade.java	2000/07/29 01:35:17	1.2
  @@ -86,6 +86,11 @@
       void recycle() {
   	
       }
  +
  +    void init() {
  +	limit=req.getContentLength();
  +	bytesRead=0;
  +    }
       
       // -------------------- ServletInputStream methods 
       
  
  
  

Mime
View raw message