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 Tomcat.java
Date Fri, 29 Dec 2000 21:24:36 GMT
costin      00/12/29 13:24:35

  Modified:    src/facade22/org/apache/tomcat/facade
                        HttpServletRequestFacade.java
               src/share/org/apache/tomcat/helper RequestUtil.java
               src/share/org/apache/tomcat/modules/config
                        ServerXmlInterceptor.java WebAppsConfig.java
               src/share/org/apache/tomcat/request StaticInterceptor.java
               src/share/org/apache/tomcat/startup Tomcat.java
  Removed:     src/share/org/apache/tomcat/helper ServerXmlHelper.java
  Log:
  Minor fixes ( including the build :-), preparing to finish RequestUtil
  ( the last "intermediary" class - neither core nor util nor module ).
  
  After that is done, tomcat 3.3 will consist of only 3 components:
  
  - the "core" - 9 classes ( including TomcatException ): basic representation
  for request, response, location, application, server, module.
  
  - modules ( tomcat/context and tomcat/request modules will be moved to
  tomcat/modules and organized by type, again as in Apache 2.0 ). ( about 30
  modules so far - probably 20 are important )
  
  - utilities ( similar with APR - more work is needed to optimize and improve
  the documentation, but that's a different story, not tomcat3.3 )
  
  ( the servlet2.2 is a particular module/group of modules ).
  
  ( One more step would be to remove/move out all non-essential modules
  ( i.e. "features" that are not required for normal operation ) - but I don't
  like removing existing features, probably we can leave them in.)
  
  Remaining items for this year: Parameters, Sessions, maybe Encoding (
  making it a module - the rest can be done independently ).
  
  Revision  Changes    Path
  1.14      +1 -1      jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java
  
  Index: HttpServletRequestFacade.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletRequestFacade.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- HttpServletRequestFacade.java	2000/12/26 22:58:50	1.13
  +++ HttpServletRequestFacade.java	2000/12/29 21:24:32	1.14
  @@ -360,7 +360,7 @@
       /** Delegate to RequestUtil
        */
       public Enumeration getLocales() {
  -        return RequestUtil.getLocales(request);
  +        return RequestUtil.getLocales(request.getMimeHeaders());
       }
   
       /** Delegate to Context
  
  
  
  1.7       +8 -7      jakarta-tomcat/src/share/org/apache/tomcat/helper/RequestUtil.java
  
  Index: RequestUtil.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/helper/RequestUtil.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- RequestUtil.java	2000/11/30 04:58:43	1.6
  +++ RequestUtil.java	2000/12/29 21:24:33	1.7
  @@ -59,8 +59,9 @@
   
   package org.apache.tomcat.helper;
   
  -import org.apache.tomcat.core.*;
  +import org.apache.tomcat.core.Request;
   import org.apache.tomcat.util.*;
  +
   import java.io.*;
   import java.net.*;
   import java.util.*;
  @@ -272,8 +273,8 @@
   
   
       
  -    public static Locale getLocale(Request req) {
  -    	String acceptLanguage = req.getHeader("Accept-Language");
  +    public static Locale getLocale(MimeHeaders headers) {
  +    	String acceptLanguage = headers.getHeader("Accept-Language");
   	    if( acceptLanguage == null ) return Locale.getDefault();
   
           Hashtable languages = new Hashtable();
  @@ -288,8 +289,8 @@
           return (Locale)l.elementAt(0);
       }
   
  -    public static Enumeration getLocales(Request req) {
  -	String acceptLanguage = req.getHeader("Accept-Language");
  +    public static Enumeration getLocales(MimeHeaders headers) {
  +	String acceptLanguage = headers.getHeader("Accept-Language");
       	// Short circuit with an empty enumeration if null header
           if (acceptLanguage == null) {
               Vector v = new Vector();
  @@ -551,7 +552,7 @@
       }
   
   
  -    public static int readBody(Request req, byte body[], int len)
  +    private static int readBody(Request req, byte body[], int len)
   	throws IOException
       {
   	int offset = 0;
  @@ -566,7 +567,7 @@
   	return len;
       }
       
  -    public static int readData(InputStream in, byte buf[], int length) {
  +    private static int readData(InputStream in, byte buf[], int length) {
           int read = 0;
           try {
               do {
  
  
  
  1.4       +5 -4      jakarta-tomcat/src/share/org/apache/tomcat/modules/config/ServerXmlInterceptor.java
  
  Index: ServerXmlInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/ServerXmlInterceptor.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ServerXmlInterceptor.java	2000/12/29 20:31:34	1.3
  +++ ServerXmlInterceptor.java	2000/12/29 21:24:33	1.4
  @@ -152,15 +152,15 @@
       public void setHome( String h ) {
   	System.getProperties().put("tomcat.home", h);
       }
  -}
   /**
    *  Helper for reading server.xml
    *
    * @author Costin
    */
  -class ServerXmlHelper {
  -    private static StringManager sm =
  -	StringManager.getManager("org.apache.tomcat.resources");
  +    static class ServerXmlHelper {
  +
  +	private static StringManager sm =
  +	    StringManager.getManager("org.apache.tomcat.resources");
   
       public static final String[] MODULE_PKGS={
   	"org.apache.tomcat.modules.session.",
  @@ -363,4 +363,5 @@
   	    return false;
   	}
       }
  +}
   }
  
  
  
  1.3       +3 -3      jakarta-tomcat/src/share/org/apache/tomcat/modules/config/WebAppsConfig.java
  
  Index: WebAppsConfig.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/config/WebAppsConfig.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- WebAppsConfig.java	2000/12/29 00:20:21	1.2
  +++ WebAppsConfig.java	2000/12/29 21:24:33	1.3
  @@ -161,9 +161,9 @@
   	host=unEscapeHost( host );
   	if( host!=null) 
   	    xh.setVariable( "current_host", host );
  -	    
  -	ServerXmlHelper.setContextRules( xh );
  -	ServerXmlHelper.setLogRules( xh );
  + 	    
  +	ServerXmlInterceptor.ServerXmlHelper.setContextRules( xh );
  +	ServerXmlInterceptor.ServerXmlHelper.setLogRules( xh );
   
   	File f=new File( dir, name );
   	try {
  
  
  
  1.29      +1 -1      jakarta-tomcat/src/share/org/apache/tomcat/request/StaticInterceptor.java
  
  Index: StaticInterceptor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/request/StaticInterceptor.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- StaticInterceptor.java	2000/12/26 23:35:35	1.28
  +++ StaticInterceptor.java	2000/12/29 21:24:34	1.29
  @@ -355,7 +355,7 @@
       {
   	// this is how get locale is implemented. Ugly, but it's in
   	// the next round of optimizations
  -	Locale locale=RequestUtil.getLocale(req);
  +	Locale locale=RequestUtil.getLocale(req.getMimeHeaders());
   	StringManager sm=StringManager.
   	    getManager("org.apache.tomcat.resources",locale);
   	DateFormat dateFormat =
  
  
  
  1.48      +0 -2      jakarta-tomcat/src/share/org/apache/tomcat/startup/Tomcat.java
  
  Index: Tomcat.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/startup/Tomcat.java,v
  retrieving revision 1.47
  retrieving revision 1.48
  diff -u -r1.47 -r1.48
  --- Tomcat.java	2000/12/29 00:20:23	1.47
  +++ Tomcat.java	2000/12/29 21:24:35	1.48
  @@ -9,8 +9,6 @@
   import java.net.*;
   import org.apache.tomcat.util.*;
   import org.apache.tomcat.modules.config.*;
  -import org.apache.tomcat.helper.*;
  -import org.apache.tomcat.task.*;
   import org.apache.tomcat.util.xml.*;
   import org.apache.tomcat.core.*;
   import org.apache.tomcat.util.log.*;
  
  
  

Mime
View raw message