tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cos...@hyperreal.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/core Context.java DefaultServlet.java Reaper.java RequestAdapterImpl.java ServerSessionManager.java ServletWrapper.java
Date Mon, 01 Nov 1999 20:50:50 GMT
costin      99/11/01 12:50:49

  Modified:    src/share/org/apache/tomcat/core Context.java
                        DefaultServlet.java Reaper.java
                        RequestAdapterImpl.java ServerSessionManager.java
                        ServletWrapper.java
  Log:
  - Removed deps from tomcat.core to tomcat.server.
  - Replaced ServerRequest/ServerResponse with equivalent RequestAdapter
  code - it still need more work ( and a cleaner solution ).
  
  Revision  Changes    Path
  1.6       +3 -4      jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java
  
  Index: Context.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Context.java	1999/10/20 11:23:46	1.5
  +++ Context.java	1999/11/01 20:50:46	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v 1.5
1999/10/20 11:23:46 akv Exp $
  - * $Revision: 1.5 $
  - * $Date: 1999/10/20 11:23:46 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Context.java,v 1.6
1999/11/01 20:50:46 costin Exp $
  + * $Revision: 1.6 $
  + * $Date: 1999/11/01 20:50:46 $
    *
    * ====================================================================
    *
  @@ -64,7 +64,6 @@
   
   package org.apache.tomcat.core;
   
  -import org.apache.tomcat.server.*;
   import org.apache.tomcat.util.*;
   import org.apache.tomcat.deployment.*;
   import java.io.*;
  
  
  
  1.4       +3 -4      jakarta-tomcat/src/share/org/apache/tomcat/core/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/DefaultServlet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- DefaultServlet.java	1999/10/19 06:45:03	1.3
  +++ DefaultServlet.java	1999/11/01 20:50:46	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/DefaultServlet.java,v
1.3 1999/10/19 06:45:03 jhunter Exp $
  - * $Revision: 1.3 $
  - * $Date: 1999/10/19 06:45:03 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/DefaultServlet.java,v
1.4 1999/11/01 20:50:46 costin Exp $
  + * $Revision: 1.4 $
  + * $Date: 1999/11/01 20:50:46 $
    *
    * ====================================================================
    *
  @@ -64,7 +64,6 @@
   
   package org.apache.tomcat.core;
   
  -import org.apache.tomcat.server.*;
   import org.apache.tomcat.util.*;
   import java.io.*;
   import java.net.*;
  
  
  
  1.2       +3 -4      jakarta-tomcat/src/share/org/apache/tomcat/core/Reaper.java
  
  Index: Reaper.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Reaper.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Reaper.java	1999/10/09 00:30:15	1.1
  +++ Reaper.java	1999/11/01 20:50:47	1.2
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Reaper.java,v 1.1
1999/10/09 00:30:15 duncan Exp $
  - * $Revision: 1.1 $
  - * $Date: 1999/10/09 00:30:15 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/Reaper.java,v 1.2
1999/11/01 20:50:47 costin Exp $
  + * $Revision: 1.2 $
  + * $Date: 1999/11/01 20:50:47 $
    *
    * ====================================================================
    *
  @@ -64,7 +64,6 @@
   
   package org.apache.tomcat.core;
   
  -import org.apache.tomcat.server.*;
   import org.apache.tomcat.util.*;
   
   /**
  
  
  
  1.5       +48 -6     jakarta-tomcat/src/share/org/apache/tomcat/core/RequestAdapterImpl.java
  
  Index: RequestAdapterImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestAdapterImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- RequestAdapterImpl.java	1999/10/29 23:40:46	1.4
  +++ RequestAdapterImpl.java	1999/11/01 20:50:47	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestAdapterImpl.java,v
1.4 1999/10/29 23:40:46 costin Exp $
  - * $Revision: 1.4 $
  - * $Date: 1999/10/29 23:40:46 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/RequestAdapterImpl.java,v
1.5 1999/11/01 20:50:47 costin Exp $
  + * $Revision: 1.5 $
  + * $Date: 1999/11/01 20:50:47 $
    *
    * ====================================================================
    *
  @@ -151,8 +151,7 @@
           return headers.names();
       }
       
  -    public ServletInputStream getInputStream()
  -    throws IOException {
  +    public ServletInputStream getInputStream() throws IOException {
       	return in;    
       }
   
  @@ -266,6 +265,7 @@
   	scheme = "http";// no need to use Constants
   	method = "GET";
   	requestURI="/";
  +	queryString=null;
   	protocol="HTTP/1.0";
   	headers.clear(); // XXX use recycle pattern
   	serverName="localhost";
  @@ -280,6 +280,48 @@
   
       // -------------------- Setters - not part of RequestAdapter interface
   
  -    
  +    public void setScheme( String scheme ) {
  +	this.scheme=scheme;
  +    }
  +
  +    public void setMethod( String method ) {
  +	this.method=method;
  +    }
  +
  +    public void setRequestURI( String requestURI ) {
  +	this.requestURI=requestURI;
  +    }
  +
  +    public void setQueryString( String queryString ) {
  +	this.queryString=queryString;
  +    }
  +
  +    public void setProtocol( String protocol ) {
  +	this.protocol=protocol;
  +    }
  +
  +    public void setMimeHeaders( MimeHeaders headers ) {
  +	this.headers=headers;
  +    }
  +
  +    public void setBody( StringBuffer body ) {
  +	// ??? 
  +    }
  +
  +    public void setServerName( String serverName ) {
  +	this.serverName=serverName;
  +    }
  +
  +    public void setServerPort(int serverPort ) {
  +	this.serverPort=serverPort;
  +    }
  +
  +    public void setRemoteAddr( String remoteAddr ) {
  +	this.remoteAddr=remoteAddr;
  +    }
  +
  +    public void setRemoteHost(String remoteHost) {
  +	this.remoteHost=remoteHost;
  +    }
       
   }
  
  
  
  1.4       +3 -4      jakarta-tomcat/src/share/org/apache/tomcat/core/ServerSessionManager.java
  
  Index: ServerSessionManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServerSessionManager.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServerSessionManager.java	1999/10/24 16:53:19	1.3
  +++ ServerSessionManager.java	1999/11/01 20:50:47	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServerSessionManager.java,v
1.3 1999/10/24 16:53:19 costin Exp $
  - * $Revision: 1.3 $
  - * $Date: 1999/10/24 16:53:19 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServerSessionManager.java,v
1.4 1999/11/01 20:50:47 costin Exp $
  + * $Revision: 1.4 $
  + * $Date: 1999/11/01 20:50:47 $
    *
    * ====================================================================
    *
  @@ -64,7 +64,6 @@
   
   package org.apache.tomcat.core;
   
  -import org.apache.tomcat.server.*;
   import org.apache.tomcat.util.*;
   import java.io.*;
   import java.net.*;
  
  
  
  1.5       +15 -13    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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ServletWrapper.java	1999/10/28 05:15:26	1.4
  +++ ServletWrapper.java	1999/11/01 20:50:48	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java,v
1.4 1999/10/28 05:15:26 costin Exp $
  - * $Revision: 1.4 $
  - * $Date: 1999/10/28 05:15:26 $
  + * $Header: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/core/ServletWrapper.java,v
1.5 1999/11/01 20:50:48 costin Exp $
  + * $Revision: 1.5 $
  + * $Date: 1999/11/01 20:50:48 $
    *
    * ====================================================================
    *
  @@ -65,8 +65,6 @@
   package org.apache.tomcat.core;
   
   import org.apache.tomcat.util.*;
  -import org.apache.tomcat.server.ServerRequest;
  -import org.apache.tomcat.server.ServerResponse;
   import java.io.*;
   import java.net.*;
   import java.util.*;
  @@ -212,26 +210,30 @@
   	    // XXX XXX XXX
   	    // core shouldn't depend on a particular connector!
   	    // need to find out what this code does!
  -	    Request request = new ServerRequest();
  -            Response response = new ServerResponse();
  -
  +	    RequestAdapterImpl reqA=new RequestAdapterImpl();
  +	    ResponseAdapterImpl resA=new ResponseAdapterImpl();
  +	    
  +	    Request request = new Request();
  +            Response response = new Response();
               request.recycle();
               response.recycle();
   
  +	    request.setRequestAdapter( reqA );
  +	    response.setResponseAdapter( resA );
  +
               request.setResponse(response);
               response.setRequest(request);
   
               String requestURI = path + "?" +
                   Constants.JSP.Directive.Compile.Name + "=" +
                   Constants.JSP.Directive.Compile.Value;
  +
  +            reqA.setRequestURI(getContext().getPath() + path);
  +	    reqA.setQueryString( Constants.JSP.Directive.Compile.Name + "=" +
  +				 Constants.JSP.Directive.Compile.Value );
   
  -            request.setRequestURI(getContext().getPath() + requestURI);
               request.setContext(getContext());
               request.getSession(true);
  -
  -            OutputStream devNull = new DevNullOutputStream();
  -
  -            ((ServerResponse)response).setOutputStream(devNull);
   
               RequestDispatcher rd =
                   config.getServletContext().getRequestDispatcher(requestURI);
  
  
  

Mime
View raw message