tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@apache.org
Subject cvs commit: jakarta-tomcat-4.0/webapps/ROOT index.jsp index.html
Date Fri, 21 Dec 2001 21:15:45 GMT
craigmcc    01/12/21 13:15:45

  Modified:    catalina/src/share/org/apache/catalina Globals.java
               catalina/src/share/org/apache/catalina/cluster
                        ClusterMemberInfo.java
               catalina/src/share/org/apache/catalina/connector/http
                        Constants.java HttpProcessor.java
               catalina/src/share/org/apache/catalina/connector/http10
                        Constants.java HttpProcessor.java
               catalina/src/share/org/apache/catalina/core
                        ApplicationContext.java StandardEngine.java
               catalina/src/share/org/apache/catalina/servlets
                        DefaultServlet.java HTMLManagerServlet.java
               catalina/src/share/org/apache/catalina/valves
                        ErrorReportValve.java
  Added:       catalina/src/share/org/apache/catalina/util ServerInfo.java
                        ServerInfo.properties
               webapps/ROOT index.jsp
  Removed:     webapps/ROOT index.html
  Log:
  Make it easy to customize the Tomcat version number when updating it (or when
  embedding it in another environment).  Now, the only file that has to be
  modified is:
  
    catalina/src/share/org/apache/catalina/util/ServerInfo.properties
  
  Revision  Changes    Path
  1.43      +4 -10     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Globals.java
  
  Index: Globals.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Globals.java,v
  retrieving revision 1.42
  retrieving revision 1.43
  diff -u -r1.42 -r1.43
  --- Globals.java	2001/10/27 18:56:22	1.42
  +++ Globals.java	2001/12/21 21:15:44	1.43
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Globals.java,v
1.42 2001/10/27 18:56:22 craigmcc Exp $
  - * $Revision: 1.42 $
  - * $Date: 2001/10/27 18:56:22 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/Globals.java,v
1.43 2001/12/21 21:15:44 craigmcc Exp $
  + * $Revision: 1.43 $
  + * $Date: 2001/12/21 21:15:44 $
    *
    * ====================================================================
    *
  @@ -69,7 +69,7 @@
    * Global constants that are applicable to multiple packages within Catalina.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.42 $ $Date: 2001/10/27 18:56:22 $
  + * @version $Revision: 1.43 $ $Date: 2001/12/21 21:15:44 $
    */
   
   public final class Globals {
  @@ -230,12 +230,6 @@
        */
       public static final String REQUEST_URI_ATTR =
           "javax.servlet.include.request_uri";
  -
  -
  -    /**
  -     * The descriptive information about this server and version.
  -     */
  -    public static final String SERVER_INFO = "Apache Tomcat/4.1-dev";
   
   
       /**
  
  
  
  1.4       +6 -6      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/cluster/ClusterMemberInfo.java
  
  Index: ClusterMemberInfo.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/cluster/ClusterMemberInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ClusterMemberInfo.java	2001/07/22 20:25:06	1.3
  +++ ClusterMemberInfo.java	2001/12/21 21:15:44	1.4
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/cluster/ClusterMemberInfo.java,v
1.3 2001/07/22 20:25:06 pier Exp $
  - * $Revision: 1.3 $
  - * $Date: 2001/07/22 20:25:06 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/cluster/ClusterMemberInfo.java,v
1.4 2001/12/21 21:15:44 craigmcc Exp $
  + * $Revision: 1.4 $
  + * $Date: 2001/12/21 21:15:44 $
    *
    * ====================================================================
    *
  @@ -64,14 +64,14 @@
   package org.apache.catalina.cluster;
   
   import java.io.Serializable;
  -import org.apache.catalina.Globals;
  +import org.apache.catalina.util.ServerInfo;
   
   /**
    * Class that represents a member in a Cluster, keeps information
    * that can be used when implementing Classes thats utilizing a Cluster.
    *
    * @author Bip Thelin
  - * @version $Revision: 1.3 $
  + * @version $Revision: 1.4 $
    */
   
   public final class ClusterMemberInfo implements Serializable {
  @@ -103,7 +103,7 @@
       }
   
       public String getServerVersion() {
  -        return(Globals.SERVER_INFO);
  +        return(ServerInfo.getServerInfo());
       }
   
       public void setClusterInfo(String clusterInfo) {
  
  
  
  1.6       +3 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/Constants.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Constants.java	2001/07/26 04:03:23	1.5
  +++ Constants.java	2001/12/21 21:15:44	1.6
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/Constants.java,v
1.5 2001/07/26 04:03:23 remm Exp $
  - * $Revision: 1.5 $
  - * $Date: 2001/07/26 04:03:23 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/Constants.java,v
1.6 2001/12/21 21:15:44 craigmcc Exp $
  + * $Revision: 1.6 $
  + * $Date: 2001/12/21 21:15:44 $
    *
    * ====================================================================
    *
  @@ -65,9 +65,6 @@
   package org.apache.catalina.connector.http;
   
   
  -import org.apache.catalina.Globals;
  -
  -
   /**
    * Static constants for this package.
    */
  @@ -75,8 +72,6 @@
   public final class Constants {
   
       public static final String Package = "org.apache.catalina.connector.http";
  -    public static final String ServerInfo =
  -        Globals.SERVER_INFO + " (HTTP/1.1 Connector)";
       public static final int DEFAULT_CONNECTION_TIMEOUT = 60000;
   
       public static final int PROCESSOR_IDLE = 0;
  
  
  
  1.41      +16 -5     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- HttpProcessor.java	2001/11/16 09:46:53	1.40
  +++ HttpProcessor.java	2001/12/21 21:15:44	1.41
  @@ -1,6 +1,6 @@
  -/* * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.40 2001/11/16 09:46:53 remm Exp $
  - * $Revision: 1.40 $
  - * $Date: 2001/11/16 09:46:53 $
  +/* * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpProcessor.java,v
1.41 2001/12/21 21:15:44 craigmcc Exp $
  + * $Revision: 1.41 $
  + * $Date: 2001/12/21 21:15:44 $
    *
    * ====================================================================
    *
  @@ -94,6 +94,7 @@
   import org.apache.catalina.util.FastHttpDateFormat;
   import org.apache.catalina.util.LifecycleSupport;
   import org.apache.catalina.util.RequestUtil;
  +import org.apache.catalina.util.ServerInfo;
   import org.apache.catalina.util.StringManager;
   import org.apache.catalina.util.StringParser;
   
  @@ -107,13 +108,23 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.40 $ $Date: 2001/11/16 09:46:53 $
  + * @version $Revision: 1.41 $ $Date: 2001/12/21 21:15:44 $
    */
   
   final class HttpProcessor
       implements Lifecycle, Runnable {
   
   
  +    // ----------------------------------------------------- Manifest Constants
  +
  +
  +    /**
  +     * Server information string for this server.
  +     */
  +    private static final String SERVER_INFO =
  +        ServerInfo.getServerInfo() + " (HTTP/1.1 Connector)";
  +
  +
       // ----------------------------------------------------------- Constructors
   
   
  @@ -947,7 +958,7 @@
                   response.setStream(output);
                   response.setRequest(request);
                   ((HttpServletResponse) response.getResponse()).setHeader
  -                    ("Server", Constants.ServerInfo);
  +                    ("Server", SERVER_INFO);
               } catch (Exception e) {
                   log("process.create", e);
                   ok = false;
  
  
  
  1.3       +3 -8      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/Constants.java
  
  Index: Constants.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/Constants.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Constants.java	2001/07/22 20:25:07	1.2
  +++ Constants.java	2001/12/21 21:15:45	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/Constants.java,v
1.2 2001/07/22 20:25:07 pier Exp $
  - * $Revision: 1.2 $
  - * $Date: 2001/07/22 20:25:07 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/Constants.java,v
1.3 2001/12/21 21:15:45 craigmcc Exp $
  + * $Revision: 1.3 $
  + * $Date: 2001/12/21 21:15:45 $
    *
    * ====================================================================
    *
  @@ -65,9 +65,6 @@
   package org.apache.catalina.connector.http10;
   
   
  -import org.apache.catalina.Globals;
  -
  -
   /**
    * Static constants for this package.
    */
  @@ -76,8 +73,6 @@
   
       public static final String Package =
           "org.apache.catalina.connector.http10";
  -    public static final String ServerInfo =
  -        Globals.SERVER_INFO + " (HTTP/1.0 Connector)";
       public static final int DEFAULT_CONNECTION_TIMEOUT = 30000;
   
   }
  
  
  
  1.7       +16 -5     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java
  
  Index: HttpProcessor.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- HttpProcessor.java	2001/12/09 21:59:25	1.6
  +++ HttpProcessor.java	2001/12/21 21:15:45	1.7
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
1.6 2001/12/09 21:59:25 remm Exp $
  - * $Revision: 1.6 $
  - * $Date: 2001/12/09 21:59:25 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http10/HttpProcessor.java,v
1.7 2001/12/21 21:15:45 craigmcc Exp $
  + * $Revision: 1.7 $
  + * $Date: 2001/12/21 21:15:45 $
    *
    * ====================================================================
    *
  @@ -93,6 +93,7 @@
   import org.apache.catalina.Logger;
   import org.apache.catalina.util.RequestUtil;
   import org.apache.catalina.util.LifecycleSupport;
  +import org.apache.catalina.util.ServerInfo;
   import org.apache.catalina.util.StringManager;
   
   
  @@ -104,13 +105,23 @@
    * the request.  When the processor is completed, it will recycle itself.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.6 $ $Date: 2001/12/09 21:59:25 $
  + * @version $Revision: 1.7 $ $Date: 2001/12/21 21:15:45 $
    */
   
   final class HttpProcessor
       implements Lifecycle, Runnable {
   
   
  +    // ----------------------------------------------------- Manifest Constants
  +
  +
  +    /**
  +     * Server information string for this server.
  +     */
  +    private static final String SERVER_INFO =
  +        ServerInfo.getServerInfo() + " (HTTP/1.0 Connector)";
  +
  +
       // ----------------------------------------------------------- Constructors
   
   
  @@ -638,7 +649,7 @@
               response.setStream(output);
               response.setRequest(request);
               ((HttpServletResponse) response.getResponse()).setHeader
  -                ("Server", Constants.ServerInfo);
  +                ("Server", SERVER_INFO);
           } catch (Exception e) {
               log("process.create", e);
               ok = false;
  
  
  
  1.34      +6 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java
  
  Index: ApplicationContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
  retrieving revision 1.33
  retrieving revision 1.34
  diff -u -r1.33 -r1.34
  --- ApplicationContext.java	2001/11/19 18:25:39	1.33
  +++ ApplicationContext.java	2001/12/21 21:15:45	1.34
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
1.33 2001/11/19 18:25:39 craigmcc Exp $
  - * $Revision: 1.33 $
  - * $Date: 2001/11/19 18:25:39 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/ApplicationContext.java,v
1.34 2001/12/21 21:15:45 craigmcc Exp $
  + * $Revision: 1.34 $
  + * $Date: 2001/12/21 21:15:45 $
    *
    * ====================================================================
    *
  @@ -103,6 +103,7 @@
   import org.apache.catalina.deploy.ApplicationParameter;
   import org.apache.catalina.util.Enumerator;
   import org.apache.catalina.util.ResourceSet;
  +import org.apache.catalina.util.ServerInfo;
   import org.apache.catalina.util.StringManager;
   
   
  @@ -113,7 +114,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.33 $ $Date: 2001/11/19 18:25:39 $
  + * @version $Revision: 1.34 $ $Date: 2001/12/21 21:15:45 $
    */
   
   public class ApplicationContext
  @@ -726,7 +727,7 @@
        */
       public String getServerInfo() {
   
  -        return (Globals.SERVER_INFO);
  +        return (ServerInfo.getServerInfo());
   
       }
   
  
  
  
  1.12      +6 -6      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java
  
  Index: StandardEngine.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StandardEngine.java	2001/10/16 23:17:13	1.11
  +++ StandardEngine.java	2001/12/21 21:15:45	1.12
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
1.11 2001/10/16 23:17:13 remm Exp $
  - * $Revision: 1.11 $
  - * $Date: 2001/10/16 23:17:13 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/core/StandardEngine.java,v
1.12 2001/12/21 21:15:45 craigmcc Exp $
  + * $Revision: 1.12 $
  + * $Date: 2001/12/21 21:15:45 $
    *
    * ====================================================================
    *
  @@ -73,12 +73,12 @@
   import org.apache.catalina.Context;
   import org.apache.catalina.DefaultContext;
   import org.apache.catalina.Engine;
  -import org.apache.catalina.Globals;
   import org.apache.catalina.Host;
   import org.apache.catalina.LifecycleException;
   import org.apache.catalina.Request;
   import org.apache.catalina.Response;
   import org.apache.catalina.Service;
  +import org.apache.catalina.util.ServerInfo;
   
   /**
    * Standard implementation of the <b>Engine</b> interface.  Each
  @@ -86,7 +86,7 @@
    * fully qualified host name of that virtual host.
    *
    * @author Craig R. McClanahan
  - * @version $Revision: 1.11 $ $Date: 2001/10/16 23:17:13 $
  + * @version $Revision: 1.12 $ $Date: 2001/12/21 21:15:45 $
    */
   
   public class StandardEngine
  @@ -301,7 +301,7 @@
       public void start() throws LifecycleException {
   
           // Log our server identification information
  -        System.out.println(Globals.SERVER_INFO);
  +        System.out.println(ServerInfo.getServerInfo());
   
           // Standard container startup
           super.start();
  
  
  
  1.47      +6 -5      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java
  
  Index: DefaultServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
  retrieving revision 1.46
  retrieving revision 1.47
  diff -u -r1.46 -r1.47
  --- DefaultServlet.java	2001/12/20 12:18:56	1.46
  +++ DefaultServlet.java	2001/12/21 21:15:45	1.47
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
1.46 2001/12/20 12:18:56 remm Exp $
  - * $Revision: 1.46 $
  - * $Date: 2001/12/20 12:18:56 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/DefaultServlet.java,v
1.47 2001/12/21 21:15:45 craigmcc Exp $
  + * $Revision: 1.47 $
  + * $Date: 2001/12/21 21:15:45 $
    *
    * ====================================================================
    *
  @@ -115,6 +115,7 @@
   import org.apache.catalina.util.FastHttpDateFormat;
   import org.apache.catalina.util.MD5Encoder;
   import org.apache.catalina.util.RequestUtil;
  +import org.apache.catalina.util.ServerInfo;
   import org.apache.catalina.util.StringManager;
   
   
  @@ -124,7 +125,7 @@
    *
    * @author Craig R. McClanahan
    * @author Remy Maucherat
  - * @version $Revision: 1.46 $ $Date: 2001/12/20 12:18:56 $
  + * @version $Revision: 1.47 $ $Date: 2001/12/21 21:15:45 $
    */
   
   public class DefaultServlet
  @@ -1742,7 +1743,7 @@
           sb.append("</table>\r\n");
   
           sb.append("<HR size=\"1\" noshade>");
  -        sb.append("<h3>").append(Globals.SERVER_INFO).append("</h3>");
  +        sb.append("<h3>").append(ServerInfo.getServerInfo()).append("</h3>");
           sb.append("</body>\r\n");
           sb.append("</html>\r\n");
   
  
  
  
  1.5       +6 -6      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/HTMLManagerServlet.java
  
  Index: HTMLManagerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/HTMLManagerServlet.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- HTMLManagerServlet.java	2001/10/25 00:23:03	1.4
  +++ HTMLManagerServlet.java	2001/12/21 21:15:45	1.5
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/HTMLManagerServlet.java,v
1.4 2001/10/25 00:23:03 craigmcc Exp $
  - * $Revision: 1.4 $
  - * $Date: 2001/10/25 00:23:03 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/servlets/HTMLManagerServlet.java,v
1.5 2001/12/21 21:15:45 craigmcc Exp $
  + * $Revision: 1.5 $
  + * $Date: 2001/12/21 21:15:45 $
    *
    * ====================================================================
    *
  @@ -70,7 +70,7 @@
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   import org.apache.catalina.Context;
  -import org.apache.catalina.Globals;
  +import org.apache.catalina.util.ServerInfo;
   
   /**
    * Servlet that enables remote management of the web applications installed
  @@ -89,7 +89,7 @@
    * same format ar from <code>ManagerServlet</code>
    *
    * @author Bip Thelin
  - * @version $Revision: 1.4 $, $Date: 2001/10/25 00:23:03 $
  + * @version $Revision: 1.5 $, $Date: 2001/12/21 21:15:45 $
    * @see ManagerServlet
    */
   
  @@ -251,7 +251,7 @@
           writer.print("&nbsp;<input type=\"submit\" value=\"install\"></td></tr>\n");
           writer.print("<tr><td colspan=\"5\" bgcolor=\"#CCCCCC\"><font size=\"-1\"
");
           writer.print(" face=\"Arial, Helvetica, sans-serif\">\n");
  -        writer.print(Globals.SERVER_INFO+"</font></td>\n</tr>\n");
  +        writer.print(ServerInfo.getServerInfo()+"</font></td>\n</tr>\n");
           writer.print("</table>\n</form>\n</body>\n</html>");
       }
   
  
  
  
  1.1                  jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/ServerInfo.java
  
  Index: ServerInfo.java
  ===================================================================
  /*
   * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/ServerInfo.java,v
1.1 2001/12/21 21:15:45 craigmcc Exp $
   * $Revision: 1.1 $
   * $Date: 2001/12/21 21:15:45 $
   *
   * ====================================================================
   *
   * The Apache Software License, Version 1.1
   *
   * Copyright (c) 1999 The Apache Software Foundation.  All rights
   * reserved.
   *
   * Redistribution and use in source and binary forms, with or without
   * modification, are permitted provided that the following conditions
   * are met:
   *
   * 1. Redistributions of source code must retain the above copyright
   *    notice, this list of conditions and the following disclaimer.
   *
   * 2. Redistributions in binary form must reproduce the above copyright
   *    notice, this list of conditions and the following disclaimer in
   *    the documentation and/or other materials provided with the
   *    distribution.
   *
   * 3. The end-user documentation included with the redistribution, if
   *    any, must include the following acknowlegement:
   *       "This product includes software developed by the
   *        Apache Software Foundation (http://www.apache.org/)."
   *    Alternately, this acknowlegement may appear in the software itself,
   *    if and wherever such third-party acknowlegements normally appear.
   *
   * 4. The names "The Jakarta Project", "Tomcat", and "Apache Software
   *    Foundation" must not be used to endorse or promote products derived
   *    from this software without prior written permission. For written
   *    permission, please contact apache@apache.org.
   *
   * 5. Products derived from this software may not be called "Apache"
   *    nor may "Apache" appear in their names without prior written
   *    permission of the Apache Group.
   *
   * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
   * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
   * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
   * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
   * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
   * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
   * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
   * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
   * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
   * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
   * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
   * SUCH DAMAGE.
   * ====================================================================
   *
   * This software consists of voluntary contributions made by many
   * individuals on behalf of the Apache Software Foundation.  For more
   * information on the Apache Software Foundation, please see
   * <http://www.apache.org/>.
   *
   * [Additional notices, if required by prior licensing conditions]
   *
   */
  
  
  package org.apache.catalina.util;
  
  
  import java.io.InputStream;
  import java.util.Properties;
  
  
  /**
   * Simple utility module to make it easy to plug in the server identifier
   * when integrating Tomcat.
   *
   * @author Craig R. McClanahan
   * @version $Revision: 1.1 $ $Date: 2001/12/21 21:15:45 $
   */
  
  public class ServerInfo {
  
  
      // ------------------------------------------------------- Static Variables
  
  
      /**
       * The server information String with which we identify ourselves.
       */
      private static String serverInfo = null;
  
      static {
  
          try {
              InputStream is = ServerInfo.class.getResourceAsStream
                  ("/org/apache/catalina/util/ServerInfo.properties");
              Properties props = new Properties();
              props.load(is);
              is.close();
              serverInfo = props.getProperty("server.info");
          } catch (Throwable t) {
              ;
          }
          if (serverInfo == null)
              serverInfo = "Apache Tomcat";
  
      }
  
  
      // --------------------------------------------------------- Public Methods
  
  
      /**
       * Return the server identification for this version of Tomcat.
       */
      public static String getServerInfo() {
  
          return (serverInfo);
  
      }
  
  
  }
  
  
  
  1.1                  jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/util/ServerInfo.properties
  
  Index: ServerInfo.properties
  ===================================================================
  server.info=Apache Tomcat/4.1-dev
  
  
  
  1.8       +7 -6      jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java
  
  Index: ErrorReportValve.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ErrorReportValve.java	2001/12/17 20:21:11	1.7
  +++ ErrorReportValve.java	2001/12/21 21:15:45	1.8
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java,v
1.7 2001/12/17 20:21:11 remm Exp $
  - * $Revision: 1.7 $
  - * $Date: 2001/12/17 20:21:11 $
  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/valves/ErrorReportValve.java,v
1.8 2001/12/21 21:15:45 craigmcc Exp $
  + * $Revision: 1.8 $
  + * $Date: 2001/12/21 21:15:45 $
    *
    * ====================================================================
    *
  @@ -89,6 +89,7 @@
   import org.apache.catalina.ValveContext;
   import org.apache.catalina.connector.HttpResponseWrapper;
   import org.apache.catalina.util.RequestUtil;
  +import org.apache.catalina.util.ServerInfo;
   import org.apache.catalina.util.StringManager;
   
   
  @@ -104,7 +105,7 @@
    * @author Craig R. McClanahan
    * @author <a href="mailto:nicolaken@supereva.it">Nicola Ken Barozzi</a> Aisa
    * @author <a href="mailto:stefano@apache.org">Stefano Mazzocchi</a>
  - * @version $Revision: 1.7 $ $Date: 2001/12/17 20:21:11 $
  + * @version $Revision: 1.8 $ $Date: 2001/12/21 21:15:45 $
    */
   
   public class ErrorReportValve
  @@ -300,7 +301,7 @@
           StringBuffer sb = new StringBuffer();
   
           sb.append("<html><head><title>");
  -        sb.append(Globals.SERVER_INFO).append(" - ");
  +        sb.append(ServerInfo.getServerInfo()).append(" - ");
           sb.append(sm.getString("errorReportValve.errorReport"));
           sb.append("</title>");
           sb.append("<STYLE><!--");
  @@ -352,7 +353,7 @@
           }
   
           sb.append("<HR size=\"1\" noshade>");
  -        sb.append("<h3>").append(Globals.SERVER_INFO).append("</h3>");
  +        sb.append("<h3>").append(ServerInfo.getServerInfo()).append("</h3>");
           sb.append("</body></html>");
   
           try {
  
  
  
  1.1                  jakarta-tomcat-4.0/webapps/ROOT/index.jsp
  
  Index: index.jsp
  ===================================================================
  <!doctype html public "-//w3c//dtd html 4.0 transitional//en" "http://www.w3.org/TR/REC-html40/strict.dtd">
  <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
      <title>Jakarta Project - Tomcat (v4.1-dev)</title>
      <style type="text/css">
        <!--
          body {
              color: #000000;
              background-color: #FFFFFF;
              font-family: Arial, "Times New Roman", Times;
              font-size: 16px;
          }
  
          A:link {
              color: blue
          }
  
          A:visited {
              color: blue
          }
  
          td {
              color: #000000;
              font-family: Arial, "Times New Roman", Times;
              font-size: 16px;
          }
  
          .code {
              color: #000000;
              font-family: "Courier New", Courier;
              font-size: 16px;
          }
        -->
      </style>
  </head>
  
  <body>
  
  <!-- Header -->
  <table width="100%">
      <tr>
          <td align="left" width="130"><a href="http://jakarta.apache.org/tomcat/index.html"><img
src="tomcat.gif" height="92" width="130" border="0" alt="The Mighty Tomcat - MEOW!"></td>
          <td align="left" valign="top">
              <table>
                  <tr><td align="left" valign="top"><b><%= application.getServerInfo()
%></b></td></tr>
              </table>
          </td>
          <td align="right"><a href="http://jakarta.apache.org/"><img src="jakarta-banner.gif"
height="100" width="350" border="0" alt="The Jakarta Project"></a></td>
      </tr>
  </table>
  
  <br>
  
  <table>
      <tr>
  
          <!-- Table of Contents -->
          <td valign="top">
              <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolor="#000000">
                  <tr>
                      <td bgcolor="#D2A41C" bordercolor="#000000" align="left" nowrap>
                          <font face="Verdana" size="+1"><i>Web Applications</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>
                      </td>
                  </tr>
                  <tr>
                      <td bgcolor="#FFDC75" bordercolor="#000000" nowrap>
                          <a href="examples/jsp/">JSP Examples</a><br>
                          <a href="examples/servlets/">Servlet Examples</a><br>
                          <a href="webdav/">WebDAV capabilities</a><br>
                          &nbsp;
                      </td>
                  </tr>
              </table>
              <br>
              <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolor="#000000">
                  <tr>
                      <td bgcolor="#D2A41C" bordercolor="#000000" align="left" nowrap>
                          <font face="Verdana" size="+1"><i>Documentation</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>
                      </td>
                  </tr>
                  <tr>
                      <td bgcolor="#FFDC75" bordercolor="#000000" nowrap>
                          <a href="tomcat-docs">Tomcat Documentation</a><br>
                          &nbsp;
                      </td>
                  </tr>
              </table>
              <br>
              <table width="100%" border="1" cellspacing="0" cellpadding="3" bordercolor="#000000">
                  <tr>
                      <td bgcolor="#D2A41C" bordercolor="#000000" align="left" nowrap>
                          <font face="Verdana" size="+1"><i>Miscellaneous</i>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</font>
                      </td>
                  </tr>
                  <tr>
                      <td bgcolor="#FFDC75" bordercolor="#000000" nowrap>
                          <a href="http://java.sun.com/products/jsp">Sun's Java Server
Pages Site</a><br>
                          <a href="http://java.sun.com/products/servlet">Sun's Servlet
Site</a><br>
                          &nbsp;
                      </td>
                  </tr>
              </table>
          </td>
  
          <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  
          <!-- Body -->
          <td align="left" valign="top">
              <p><center><b>If you're seeing this page via a web browser,
it means you've setup Tomcat successfully. Congratulations!</b></center></p>
  
              <p>As you may have guessed by now, this is the default Tomcat home page.
It can be found on the local filesystem at:
              <blockquote>
                  <p class="code">$CATALINA_HOME/webapps/ROOT/index.html</p>
              </blockquote>
              </p>
  
              <p>where "$CATALINA_HOME" is the root of the Tomcat installation directory.
If you're seeing this page, and you don't think you should be, then either you're either a
user who has arrived at new installation of Tomcat, or you're an administrator who hasn't
got his/her setup quite right. Providing the latter is the case, please refer to the <a
href="tomcat-docs">Tomcat Documentation</a> for more detailed setup and administration
information than is found in the INSTALL file.</p>
  
              <p>Included with this release are a host of sample Servlets and JSPs (with
associated source code), extensive documentation (including the Servlet 2.3 and JSP 1.2 API
JavaDoc), and an introductory guide to developing web applications.</p>
  
              <p>You can find more information about the JSP and Servlet technologies
by subscribing to one or more of the following Servlet and JSP related interest lists:</p>
  
              <ul>
                  <li><b><a href="mailto:listserv@java.sun.com?subject=subscription
request: jsp-interest&body=subscribe jsp-interest [Your Full Name]">jsp-interest@java.sun.com</a></b></li>
                  <li><b><a href="mailto:listserv@java.sun.com?subject=subscription
request: servlet-interest&body=subscribe servlet-interest [Your Full Name]">servlet-interest@java.sun.com</a></b></li>
              </ul>
  
              <p>In addition, Tomcat-specific mailing lists are available at the Jakarta
project web site:</p>
  
             <ul>
                 <li><b><a href="mailto:tomcat-dev-subscribe@jakarta.apache.org">tomcat-dev@jakarta.apache.org</a></b>
for developers working on Tomcat</li>
                 <li><b><a href="mailto:tomcat-user-subscribe@jakarta.apache.org">tomcat-user@jakarta.apache.org</a></b>
for general questions related to configuring and using Tomcat</li>
             </ul>
  
              <p>Thanks for using Tomcat!</p>
  
              <p align="right"><font size=-1><img src="tomcat-power.gif" width="77"
height="80"></font><br>
              &nbsp;
              <font size=-1>Copyright &copy; 1999-2001 Apache Software Foundation</font><br>
              <font size=-1>All Rights Reserved</font> <br>
              &nbsp;</p>
              <p align="right">&nbsp;</p>
  
          </td>
  
      </tr>
  </table>
  
  </body>
  </html>
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message