Andrew Overholt 185a712
Index: .classpath
Andrew Overholt 185a712
===================================================================
Andrew Overholt 185a712
RCS file: /cvsroot/eclipse/org.eclipse.tomcat/.classpath,v
Andrew Overholt 185a712
retrieving revision 1.20
Andrew Overholt 185a712
diff -u -r1.20 .classpath
Andrew Overholt 185a712
--- .classpath	21 Apr 2005 23:31:58 -0000	1.20
Andrew Overholt d1b3f45
+++ .classpath	6 Mar 2006 21:10:23 -0000
Andrew Overholt 185a712
@@ -1,29 +1,36 @@
Andrew Overholt 185a712
 
Andrew Overholt 185a712
 <classpath>
Andrew Overholt 185a712
 	<classpathentry kind="src" path="src"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="catalina.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="bootstrap.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="commons-beanutils.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="commons-collections.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="commons-digester.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="commons-logging-api.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="commons-modeler.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="jakarta-regexp-1.3.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="jasper-compiler.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="jasper-runtime.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="mx4j-jmx.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="naming-common.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="naming-factory.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="naming-resources.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="servlet.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="servlets-common.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="servlets-default.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="servlets-invoker.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="servlets-manager.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="tomcat-coyote.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="tomcat-http11.jar"/>
Andrew Overholt 185a712
-	<classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="tomcat-util.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="catalina.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="bootstrap.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="commons-beanutils.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="commons-collections.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="commons-digester.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="commons-modeler.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="jasper-compiler.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="jasper-runtime.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="mx4j-jmx.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="naming-factory.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="naming-resources.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="servlets-default.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="servlets-invoker.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="tomcat-coyote.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry exported="true" kind="lib" path="tomcat-util.jar"/>
Andrew Overholt 185a712
 	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
Andrew Overholt 185a712
 	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="commons-dbcp.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="commons-digester-rss.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="commons-el.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="commons-fileupload.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="commons-launcher.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="commons-logging.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="commons-pool.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="mx4j-impl.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="mx4j.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="jspapi.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="catalina-optional.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="tomcat-http.jar"/>
Andrew Overholt 185a712
+	<classpathentry kind="lib" path="servletapi5.jar"/>
Andrew Overholt d1b3f45
+	<classpathentry kind="lib" path="regexp-1.3.jar"/>
Andrew Overholt 185a712
 	<classpathentry kind="output" path="bin"/>
Andrew Overholt 185a712
 </classpath>
Andrew Overholt 185a712
Index: about.html
Andrew Overholt 185a712
===================================================================
Andrew Overholt 185a712
RCS file: /cvsroot/eclipse/org.eclipse.tomcat/about.html,v
Andrew Overholt 185a712
retrieving revision 1.24
Andrew Overholt 185a712
diff -u -r1.24 about.html
Andrew Overholt 185a712
--- about.html	21 Jun 2005 00:52:06 -0000	1.24
Andrew Overholt d1b3f45
+++ about.html	6 Mar 2006 21:10:23 -0000
Andrew Overholt 185a712
@@ -8,7 +8,7 @@
Andrew Overholt 185a712
 <body lang="EN-US">
Andrew Overholt 185a712
 

About This Content

Andrew Overholt 185a712
 
Andrew Overholt 185a712
-

February 24, 2005

Andrew Overholt 185a712
+

February 24, 2005 (modified June 14, 2005 with update to Tomcat 5.0.30)

Andrew Overholt 185a712
 

License

Andrew Overholt 185a712
 
Andrew Overholt 185a712
 

The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise indicated below, the Content is provided to you under the terms and conditions of the

Andrew Overholt 185a712
@@ -23,7 +23,7 @@
Andrew Overholt 185a712
 
Andrew Overholt 185a712
 

The Content includes items that have been sourced from third parties as follows:

Andrew Overholt 185a712
 
Andrew Overholt 185a712
-

Tomcat 4.1.30

Andrew Overholt 185a712
+

Tomcat 5.0.30

Andrew Overholt 185a712
 

The plug-in is based on software developed by The Apache Software Foundation as part of the Jakarta project. Therefore:

Andrew Overholt 185a712
 
Andrew Overholt 185a712
 
Andrew Overholt 185a712
@@ -35,24 +35,31 @@
Andrew Overholt 185a712
 
    Andrew Overholt 185a712
     	
  • bootstrap.jar
  • Andrew Overholt 185a712
     	
  • catalina.jar
  • Andrew Overholt 185a712
    -	
  • commons-beanutils.jar
  • Andrew Overholt 185a712
    -	
  • commons-collections.jar
  • Andrew Overholt 185a712
    -	
  • commons-digester.jar
  • Andrew Overholt 185a712
    -	
  • commons-logging.jar
  • Andrew Overholt 185a712
    -	
  • commons-logging-api.jar
  • Andrew Overholt 185a712
    -	
  • commons-modeler.jar
  • Andrew Overholt 185a712
    -	
  • jakarta-regexp-1.3.jar
  • Andrew Overholt 185a712
    -	
  • jasper-compiler.jar
  • Andrew Overholt 185a712
    -	
  • jasper-runtime.jar
  • Andrew Overholt 185a712
    +	
  • catalina-optional.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-beanutils.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-collections.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-dbcp.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-digester.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-digester-rss.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-el.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-fileupload.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-launcher.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-logging.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-modeler.jar
  • Andrew Overholt 185a712
    +	
  • jakarta-commons-pool.jar
  • Andrew Overholt 185a712
    +	
  • jasper5-compiler.jar
  • Andrew Overholt 185a712
    +	
  • jasper5-runtime.jar
  • Andrew Overholt 185a712
    +	
  • mx4j.jar
  • Andrew Overholt 185a712
    +	
  • mx4j-impl.jar
  • Andrew Overholt 185a712
     	
  • mx4j-jmx.jar
  • Andrew Overholt 185a712
     	
  • naming-common.jar
  • Andrew Overholt 185a712
     	
  • naming-factory.jar
  • Andrew Overholt 185a712
     	
  • naming-resources.jar
  • Andrew Overholt 185a712
    -	
  • servlet.jar
  • Andrew Overholt 185a712
    +	
  • regexp.jar
  • Andrew Overholt 185a712
    +	
  • servletapi5.jar
  • Andrew Overholt 185a712
     	
  • servlets-common.jar
  • Andrew Overholt 185a712
     	
  • servlets-default.jar
  • Andrew Overholt 185a712
     	
  • servlets-invoker.jar
  • Andrew Overholt 185a712
    -	
  • servlets-manager.jar
  • Andrew Overholt 185a712
     	
  • tomcat-coyote.jar
  • Andrew Overholt 185a712
     	
  • tomcat-http11.jar
  • Andrew Overholt 185a712
     	
  • tomcat-util.jar
  • Andrew Overholt 185a712
    @@ -66,10 +73,10 @@
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
     

    Tomcat is:

    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -
    Copyright (c) 1999, 2000 The Apache Software Foundation. All rights reserved.
    Andrew Overholt 185a712
    +
    Copyright (c) 1999-2003 The Apache Software Foundation. All rights reserved.
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -

    Your use of the Tomcat code is subject to the terms and conditions of the Apache Software License 1.1 which is available at

    Andrew Overholt 185a712
    -http://www.apache.org/licenses/LICENSE-1.1.  More specifically:

    Andrew Overholt 185a712
    +

    Your use of the Tomcat code is subject to the terms and conditions of the Apache Software License 2.0 which is available at

    Andrew Overholt 185a712
    +http://www.apache.org/licenses/LICENSE-2.0.  More specifically:

    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
     	1. Redistributions of source code must retain the above copyright notice, this list of
    Andrew Overholt 185a712
     	conditions and the following disclaimer.
    Andrew Overholt 185a712
    @@ -107,11 +114,11 @@
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
     

    Source code for Tomcat is available at http://jakarta.apache.org/tomcat/.

    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -MX4J 1.1.1
    Andrew Overholt 185a712
    +MX4J 2.1.0
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -

    Tomcat 4.1.30 includes mx4j-jmx.jar from MX4J 1.1.1. MX4J is:

    Andrew Overholt 185a712
    +

    Tomcat 5.0.30 includes mx4j.jar, mx4j-jmx.jar and mx4j-impl.jar from MX4J 2.1.0. MX4J is:

    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -
    Copyright (c) 2001 MX4J. All rights reserved.
    Andrew Overholt 185a712
    +
    Copyright (c) 2001-2004 MX4J contributors. All rights reserved.
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
     

    Your use of the MX4J code is subject to the terms and conditions of the MX4J License, Version 1.0, a copy of which is included

    Andrew Overholt 185a712
     with the Content in the file mx4j.license.  More specifically: 

    Andrew Overholt 185a712
    Index: META-INF/MANIFEST.MF
    Andrew Overholt 185a712
    ===================================================================
    Andrew Overholt 185a712
    RCS file: /cvsroot/eclipse/org.eclipse.tomcat/META-INF/MANIFEST.MF,v
    Andrew Overholt 185a712
    retrieving revision 1.14
    Andrew Overholt 185a712
    diff -u -r1.14 MANIFEST.MF
    Andrew Overholt 185a712
    --- META-INF/MANIFEST.MF	19 May 2005 04:05:11 -0000	1.14
    Andrew Overholt d1b3f45
    +++ META-INF/MANIFEST.MF	6 Mar 2006 21:10:40 -0000
    Andrew Overholt d1b3f45
    @@ -2,30 +2,34 @@
    Andrew Overholt 185a712
     Bundle-ManifestVersion: 2
    Andrew Overholt 185a712
     Bundle-Name: %pluginName
    Andrew Overholt 185a712
     Bundle-SymbolicName: org.eclipse.tomcat; singleton:=true
    Andrew Overholt 185a712
    -Bundle-Version: 4.1.30.1
    Andrew Overholt 185a712
    -Bundle-ClassPath: tomcatwrapper.jar,
    Andrew Overholt 185a712
    +Bundle-Version: 5.5.15
    Andrew Overholt d1b3f45
    +Bundle-ClassPath: catalina-optional.jar,
    Andrew Overholt 185a712
      catalina.jar,
    Andrew Overholt 185a712
    - bootstrap.jar,
    Andrew Overholt 185a712
      commons-beanutils.jar,
    Andrew Overholt 185a712
      commons-collections.jar,
    Andrew Overholt 185a712
    + commons-digester-rss.jar,
    Andrew Overholt 185a712
      commons-digester.jar,
    Andrew Overholt 185a712
    + commons-el.jar,
    Andrew Overholt 185a712
    + commons-logging.jar,
    Andrew Overholt d1b3f45
      commons-logging-api.jar,
    Andrew Overholt 185a712
      commons-modeler.jar,
    Andrew Overholt d1b3f45
    - jakarta-regexp-1.3.jar,
    Andrew Overholt d1b3f45
    + regexp-1.3.jar,
    Andrew Overholt 185a712
      jasper-compiler.jar,
    Andrew Overholt 185a712
      jasper-runtime.jar,
    Andrew Overholt 185a712
    + jspapi.jar,
    Andrew Overholt 185a712
    + mx4j-impl.jar,
    Andrew Overholt 185a712
      mx4j-jmx.jar,
    Andrew Overholt 185a712
    - naming-common.jar,
    Andrew Overholt 185a712
    + mx4j.jar,
    Andrew Overholt 185a712
      naming-factory.jar,
    Andrew Overholt 185a712
      naming-resources.jar,
    Andrew Overholt 185a712
    - servlet.jar,
    Andrew Overholt 185a712
    - servlets-common.jar,
    Andrew Overholt 185a712
      servlets-default.jar,
    Andrew Overholt 185a712
      servlets-invoker.jar,
    Andrew Overholt 185a712
    - servlets-manager.jar,
    Andrew Overholt 185a712
      tomcat-coyote.jar,
    Andrew Overholt 185a712
    - tomcat-http11.jar,
    Andrew Overholt d1b3f45
    - tomcat-util.jar
    Andrew Overholt 185a712
    + tomcat-http.jar,
    Andrew Overholt d1b3f45
    + tomcat-util.jar,
    Andrew Overholt d1b3f45
    + regexp-1.3.jar,
    Andrew Overholt d1b3f45
    + servletapi5.jar,
    Andrew Overholt d1b3f45
    + log4j.jar
    Andrew Overholt 185a712
     Bundle-Activator: org.eclipse.tomcat.internal.TomcatPlugin
    Andrew Overholt 185a712
     Bundle-Vendor: %providerName
    Andrew Overholt d1b3f45
     Bundle-Localization: plugin
    Andrew Overholt d1b3f45
    @@ -54,8 +58,7 @@
    Andrew Overholt 185a712
      mx4j.util;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.catalina;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.catalina.connector;x-internal:=true,
    Andrew Overholt 185a712
    - org.apache.catalina.connector.http;x-internal:=true,
    Andrew Overholt 185a712
    - org.apache.catalina.connector.http10;x-internal:=true,
    Andrew Overholt d1b3f45
    + org.apache.catalina.core;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.catalina.realm;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.catalina.servlets;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.commons.beanutils;x-internal:=true,
    Andrew Overholt d1b3f45
    @@ -69,7 +72,6 @@
    Andrew Overholt d1b3f45
      org.apache.commons.digester.rss;x-internal:=true,
    Andrew Overholt d1b3f45
      org.apache.commons.digester.xmlrules;x-internal:=true,
    Andrew Overholt d1b3f45
      org.apache.commons.logging;x-internal:=true,
    Andrew Overholt d1b3f45
    - org.apache.commons.logging.impl;x-internal:=true,
    Andrew Overholt d1b3f45
      org.apache.commons.modeler;x-internal:=true,
    Andrew Overholt d1b3f45
      org.apache.commons.modeler.ant;x-internal:=true,
    Andrew Overholt d1b3f45
      org.apache.commons.modeler.mbeans;x-internal:=true,
    Andrew Overholt d1b3f45
    @@ -79,13 +81,11 @@
    Andrew Overholt d1b3f45
      org.apache.coyote.http11;x-internal:=true,
    Andrew Overholt d1b3f45
      org.apache.coyote.http11.filters;x-internal:=true,
    Andrew Overholt d1b3f45
      org.apache.coyote.memory;x-internal:=true,
    Andrew Overholt d1b3f45
    - org.apache.coyote.tomcat4;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.jasper;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.jasper.compiler;x-internal:=true,
    Andrew Overholt 185a712
    - org.apache.jasper.logging;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.jasper.runtime;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.jasper.servlet;x-internal:=true,
    Andrew Overholt 185a712
    - org.apache.jasper.util;x-internal:=true,
    Andrew Overholt 185a712
    + org.apache.jasper.util,
    Andrew Overholt 185a712
      org.apache.jasper.xmlparser;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.naming;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.naming.factory;x-internal:=true,
    Andrew Overholt d1b3f45
    @@ -95,12 +95,9 @@
    Andrew Overholt d1b3f45
      org.apache.tomcat.util;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.tomcat.util.buf;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.tomcat.util.collections;x-internal:=true,
    Andrew Overholt d1b3f45
    - org.apache.tomcat.util.compat;x-internal:=true,
    Andrew Overholt 185a712
    - org.apache.tomcat.util.handler;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.tomcat.util.http;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.tomcat.util.http.mapper;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.tomcat.util.log;x-internal:=true,
    Andrew Overholt 185a712
    - org.apache.tomcat.util.mx;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.tomcat.util.net;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.tomcat.util.net.jsse;x-internal:=true,
    Andrew Overholt 185a712
      org.apache.tomcat.util.res;x-internal:=true,
    Andrew Overholt 185a712
    Index: src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java
    Andrew Overholt 185a712
    ===================================================================
    Andrew Overholt 185a712
    RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java,v
    Andrew Overholt 185a712
    retrieving revision 1.8
    Andrew Overholt 185a712
    diff -u -r1.8 EclipseErrorReportValve.java
    Andrew Overholt 185a712
    --- src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java	23 May 2005 03:58:04 -0000	1.8
    Andrew Overholt d1b3f45
    +++ src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java	6 Mar 2006 21:10:40 -0000
    Andrew Overholt 185a712
    @@ -69,15 +69,27 @@
    Andrew Overholt 185a712
     package org.eclipse.tomcat.internal;
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -import java.io.*;
    Andrew Overholt 185a712
    -import java.util.*;
    Andrew Overholt 185a712
    -
    Andrew Overholt 185a712
    -import javax.servlet.*;
    Andrew Overholt 185a712
    -import javax.servlet.http.*;
    Andrew Overholt 185a712
    -
    Andrew Overholt 185a712
    -import org.apache.catalina.*;
    Andrew Overholt 185a712
    -import org.apache.catalina.util.*;
    Andrew Overholt 185a712
    -import org.apache.catalina.valves.*;
    Andrew Overholt 185a712
    +import java.io.IOException;
    Andrew Overholt 185a712
    +import java.io.PrintWriter;
    Andrew Overholt 185a712
    +import java.io.StringWriter;
    Andrew Overholt 185a712
    +import java.io.Writer;
    Andrew Overholt 185a712
    +import java.util.Locale;
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +import javax.servlet.ServletException;
    Andrew Overholt 185a712
    +import javax.servlet.ServletRequest;
    Andrew Overholt 185a712
    +import javax.servlet.ServletResponse;
    Andrew Overholt 185a712
    +import javax.servlet.http.HttpServletResponse;
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +import mx4j.log.Logger;
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +import org.apache.catalina.Globals;
    Andrew Overholt 185a712
    +import org.apache.catalina.Valve;
    Andrew Overholt 185a712
    +import org.apache.catalina.connector.Request;
    Andrew Overholt 185a712
    +import org.apache.catalina.connector.Response;
    Andrew Overholt 185a712
    +import org.apache.catalina.util.RequestUtil;
    Andrew Overholt 185a712
    +import org.apache.catalina.util.StringManager;
    Andrew Overholt 185a712
    +import org.apache.catalina.valves.Constants;
    Andrew Overholt 185a712
    +import org.apache.catalina.valves.ValveBase;
    Andrew Overholt 185a712
     import org.eclipse.core.runtime.Platform;
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    @@ -145,18 +157,18 @@
    Andrew Overholt 185a712
          * @exception IOException if an input/output error occurs
    Andrew Overholt 185a712
          * @exception ServletException if a servlet error occurs
    Andrew Overholt 185a712
          */
    Andrew Overholt 185a712
    -    public void invoke(Request request, Response response,
    Andrew Overholt 185a712
    -                       ValveContext context)
    Andrew Overholt 185a712
    +    public void invoke(Request request, Response response)
    Andrew Overholt 185a712
             throws IOException, ServletException {
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
             // Perform the request
    Andrew Overholt 185a712
    -        context.invokeNext(request, response);
    Andrew Overholt 185a712
    +        Valve nextValve = getNext();
    Andrew Overholt 185a712
    +        nextValve.invoke(request, response);
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -        ServletRequest sreq = (ServletRequest) request;
    Andrew Overholt 185a712
    +        ServletRequest sreq = request;
    Andrew Overholt 185a712
             Throwable throwable = 
    Andrew Overholt 185a712
                 (Throwable) sreq.getAttribute(Globals.EXCEPTION_ATTR);
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -        ServletResponse sresp = (ServletResponse) response;
    Andrew Overholt 185a712
    +        ServletResponse sresp = response;
    Andrew Overholt 185a712
             if (sresp.isCommitted()) {
    Andrew Overholt 185a712
                 return;
    Andrew Overholt 185a712
             }
    Andrew Overholt 185a712
    @@ -173,7 +185,7 @@
    Andrew Overholt 185a712
                     ;
    Andrew Overholt 185a712
                 }
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -            ServletResponse sresponse = (ServletResponse) response;
    Andrew Overholt 185a712
    +            ServletResponse sresponse = response;
    Andrew Overholt 185a712
                 if (sresponse instanceof HttpServletResponse)
    Andrew Overholt 185a712
                     ((HttpServletResponse) sresponse).sendError
    Andrew Overholt 185a712
                         (HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
    Andrew Overholt 185a712
    @@ -219,15 +231,9 @@
    Andrew Overholt 185a712
                               Throwable throwable)
    Andrew Overholt 185a712
             throws IOException {
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -        // Do nothing on non-HTTP responses
    Andrew Overholt 185a712
    -        if (!(response instanceof HttpResponse))
    Andrew Overholt 185a712
    -            return;
    Andrew Overholt 185a712
    -        HttpResponse hresponse = (HttpResponse) response;
    Andrew Overholt 185a712
    -        if (!(response instanceof HttpServletResponse))
    Andrew Overholt 185a712
    -            return;
    Andrew Overholt 185a712
    -        HttpServletResponse hres = (HttpServletResponse) response;
    Andrew Overholt 185a712
    -        int statusCode = hresponse.getStatus();
    Andrew Overholt 185a712
    -        String message = RequestUtil.filter(hresponse.getMessage());
    Andrew Overholt 185a712
    +        HttpServletResponse hres = response;
    Andrew Overholt 185a712
    +        int statusCode = response.getStatus();
    Andrew Overholt 185a712
    +        String message = RequestUtil.filter(response.getMessage());
    Andrew Overholt 185a712
             if (message == null)
    Andrew Overholt 185a712
                 message = "";
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    @@ -373,9 +379,9 @@
    Andrew Overholt 185a712
          */
    Andrew Overholt 185a712
         protected void log(String message) {
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -        Logger logger = container.getLogger();
    Andrew Overholt 185a712
    +        Logger logger = (Logger) container.getLogger();
    Andrew Overholt 185a712
             if (logger != null)
    Andrew Overholt 185a712
    -            logger.log(this.toString() + ": " + message);
    Andrew Overholt 185a712
    +            logger.info(this.toString() + ": " + message);
    Andrew Overholt 185a712
             else
    Andrew Overholt 185a712
                 System.out.println(this.toString() + ": " + message);
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    @@ -390,9 +396,9 @@
    Andrew Overholt 185a712
          */
    Andrew Overholt 185a712
         protected void log(String message, Throwable throwable) {
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -        Logger logger = container.getLogger();
    Andrew Overholt 185a712
    +        Logger logger = (Logger) container.getLogger();
    Andrew Overholt 185a712
             if (logger != null)
    Andrew Overholt 185a712
    -            logger.log(this.toString() + ": " + message, throwable);
    Andrew Overholt 185a712
    +            logger.info(this.toString() + ": " + message, throwable);
    Andrew Overholt 185a712
             else {
    Andrew Overholt 185a712
                 System.out.println(this.toString() + ": " + message);
    Andrew Overholt 185a712
                 throwable.printStackTrace(System.out);
    Andrew Overholt 185a712
    Index: src/org/eclipse/tomcat/internal/TomcatAppServer.java
    Andrew Overholt 185a712
    ===================================================================
    Andrew Overholt 185a712
    RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/TomcatAppServer.java,v
    Andrew Overholt 185a712
    retrieving revision 1.43
    Andrew Overholt 185a712
    diff -u -r1.43 TomcatAppServer.java
    Andrew Overholt 185a712
    --- src/org/eclipse/tomcat/internal/TomcatAppServer.java	22 Jun 2005 15:29:56 -0000	1.43
    Andrew Overholt d1b3f45
    +++ src/org/eclipse/tomcat/internal/TomcatAppServer.java	6 Mar 2006 21:10:40 -0000
    Andrew Overholt d1b3f45
    @@ -11,27 +11,29 @@
    Andrew Overholt d1b3f45
     package org.eclipse.tomcat.internal;
    Andrew Overholt d1b3f45
     
    Andrew Overholt d1b3f45
     import java.io.ByteArrayOutputStream;
    Andrew Overholt d1b3f45
    +import java.io.FileNotFoundException;
    Andrew Overholt d1b3f45
    +import java.io.FileOutputStream;
    Andrew Overholt d1b3f45
     import java.io.PrintStream;
    Andrew Overholt d1b3f45
     import java.net.InetAddress;
    Andrew Overholt d1b3f45
     import java.net.URL;
    Andrew Overholt 185a712
     import java.net.UnknownHostException;
    Andrew Overholt 185a712
     import java.util.ArrayList;
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -import org.apache.catalina.Connector;
    Andrew Overholt 185a712
     import org.apache.catalina.Context;
    Andrew Overholt 185a712
     import org.apache.catalina.Engine;
    Andrew Overholt 185a712
     import org.apache.catalina.Host;
    Andrew Overholt 185a712
    +import org.apache.catalina.Lifecycle;
    Andrew Overholt 185a712
     import org.apache.catalina.LifecycleEvent;
    Andrew Overholt 185a712
     import org.apache.catalina.LifecycleException;
    Andrew Overholt 185a712
     import org.apache.catalina.LifecycleListener;
    Andrew Overholt 185a712
     import org.apache.catalina.Realm;
    Andrew Overholt 185a712
    +import org.apache.catalina.connector.Connector;
    Andrew Overholt 185a712
     import org.apache.catalina.core.StandardContext;
    Andrew Overholt 185a712
     import org.apache.catalina.core.StandardHost;
    Andrew Overholt 185a712
    -import org.apache.catalina.logger.FileLogger;
    Andrew Overholt 185a712
     import org.apache.catalina.realm.MemoryRealm;
    Andrew Overholt 185a712
     import org.apache.catalina.startup.Embedded;
    Andrew Overholt 185a712
    -import org.apache.coyote.tomcat4.CoyoteConnector;
    Andrew Overholt 185a712
    -import org.apache.coyote.tomcat4.CoyoteServerSocketFactory;
    Andrew Overholt 185a712
    +import org.apache.coyote.http11.Http11Protocol;
    Andrew Overholt 185a712
    +import org.apache.tomcat.util.net.jsse.JSSEImplementation;
    Andrew Overholt 185a712
     import org.eclipse.core.runtime.CoreException;
    Andrew Overholt 185a712
     import org.eclipse.core.runtime.IConfigurationElement;
    Andrew Overholt 185a712
     import org.eclipse.core.runtime.IExtension;
    Andrew Overholt d1b3f45
    @@ -91,27 +93,40 @@
    Andrew Overholt 185a712
          *      java.lang.String)
    Andrew Overholt 185a712
          */
    Andrew Overholt 185a712
         public synchronized void start(int port, String hostAddress) throws CoreException {
    Andrew Overholt 185a712
    -        this.hostAddress = hostAddress;
    Andrew Overholt 185a712
    +    	// if null passed for hostAddress, use local host
    Andrew Overholt 185a712
    +    	if (hostAddress == null) {
    Andrew Overholt 185a712
    +    		this.hostAddress = "127.0.0.1";
    Andrew Overholt 185a712
    +    	} else {
    Andrew Overholt 185a712
    +    		this.hostAddress = hostAddress;
    Andrew Overholt 185a712
    +    	}
    Andrew Overholt 185a712
    +    	
    Andrew Overholt 185a712
    +    	InetAddress iAddress = null;
    Andrew Overholt 185a712
    +        
    Andrew Overholt 185a712
    +    	// Defaults to LOCALHOST
    Andrew Overholt 185a712
    +    	try {
    Andrew Overholt 185a712
    +    		iAddress = InetAddress.getByName(this.hostAddress);
    Andrew Overholt 185a712
    +    	} catch (UnknownHostException uhe) {
    Andrew Overholt 185a712
    +    		// will default to all interfaces
    Andrew Overholt 185a712
    +    	}
    Andrew Overholt 185a712
    +    	
    Andrew Overholt 185a712
    +    	String hostname = iAddress.getHostName();
    Andrew Overholt 185a712
    +    	
    Andrew Overholt 185a712
             this.port = port;
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
             if (isStarted) {
    Andrew Overholt 185a712
    -            return;
    Andrew Overholt 185a712
    +        	return;
    Andrew Overholt 185a712
             }
    Andrew Overholt 185a712
             isStarted = true;
    Andrew Overholt 185a712
             try {
    Andrew Overholt 185a712
    -            FileLogger logger = new FileLogger();
    Andrew Overholt 185a712
    -            logger.setDirectory(TomcatPlugin.getDefault().getStateLocation()
    Andrew Overholt 185a712
    -                    .toOSString());
    Andrew Overholt 185a712
    -            embedded = new Embedded(logger, new MemoryRealm());
    Andrew Overholt 185a712
    -            embedded.setDebug(0);
    Andrew Overholt 185a712
    -            embedded.setLogger(logger);
    Andrew Overholt 185a712
    -            URL installURL = TomcatPlugin.getDefault().getBundle()
    Andrew Overholt 185a712
    -                    .getEntry("/"); //$NON-NLS-1$
    Andrew Overholt 185a712
    -            URL resolvedURL = Platform.resolve(installURL);
    Andrew Overholt 185a712
    -            String home = Platform.asLocalURL(resolvedURL).getFile();
    Andrew Overholt 185a712
    -            System.setProperty("catalina.home", home); //$NON-NLS-1$
    Andrew Overholt 185a712
    -            String base = home;
    Andrew Overholt 185a712
    -            System.setProperty("catalina.base", base); //$NON-NLS-1$
    Andrew Overholt 185a712
    +        	embedded = new Embedded(new MemoryRealm());
    Andrew Overholt d1b3f45
    +        	embedded.setRedirectStreams(true);
    Andrew Overholt 185a712
    +        	URL installURL = TomcatPlugin.getDefault().getBundle()
    Andrew Overholt 185a712
    +					.getEntry("/"); //$NON-NLS-1$
    Andrew Overholt 185a712
    +			URL resolvedURL = Platform.resolve(installURL);
    Andrew Overholt 185a712
    +			String home = Platform.asLocalURL(resolvedURL).getFile();
    Andrew Overholt 185a712
    +			System.setProperty("catalina.home", home); //$NON-NLS-1$
    Andrew Overholt 185a712
    +			String base = home;
    Andrew Overholt 185a712
    +			System.setProperty("catalina.base", base); //$NON-NLS-1$
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
                 // Set up realm if one found
    Andrew Overholt 185a712
                 if (TomcatPlugin.getDefault().getPluginPreferences().getInt(
    Andrew Overholt d1b3f45
    @@ -119,14 +134,32 @@
    Andrew Overholt 185a712
                     Realm realm = getRealm();
    Andrew Overholt 185a712
                     embedded.setRealm(realm);
    Andrew Overholt 185a712
                 }
    Andrew Overholt 185a712
    +            
    Andrew Overholt 185a712
    +            //the embedded application is now started by using embedded.start()
    Andrew Overholt 185a712
    +            embedded.addLifecycleListener(new LifecycleListener(){
    Andrew Overholt 185a712
    +                        public void lifecycleEvent(LifecycleEvent event) {
    Andrew Overholt 185a712
    +                            if (Lifecycle.START_EVENT.equals(event.getType()))
    Andrew Overholt 185a712
    +                                running = true;
    Andrew Overholt 185a712
    +                        }
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    +            });
    Andrew Overholt d1b3f45
    +            
    Andrew Overholt d1b3f45
    +            // Install the assembled container hierarchy
    Andrew Overholt d1b3f45
    +            PrintStream sysErr = System.err;
    Andrew Overholt d1b3f45
    +            // reassign standard error to prevent Tomcat from writing
    Andrew Overholt d1b3f45
    +            // its version message there.
    Andrew Overholt d1b3f45
    +            PrintStream newOutput = new PrintStream(new FileOutputStream(
    Andrew Overholt d1b3f45
    +            		TomcatPlugin.getDefault().getStateLocation().toOSString()
    Andrew Overholt d1b3f45
    +            		+ IPath.SEPARATOR + "tomcat.log")); //$NON-NLS-1$
    Andrew Overholt d1b3f45
    +            System.setErr(newOutput);
    Andrew Overholt d1b3f45
    +
    Andrew Overholt d1b3f45
    +            embedded.setRedirectStreams(true);
    Andrew Overholt 185a712
                 // start now, and then add all the contexts..
    Andrew Overholt 185a712
                 embedded.start();
    Andrew Overholt 185a712
    -
    Andrew Overholt 185a712
                 // Create a very basic container hierarchy
    Andrew Overholt 185a712
                 engine = embedded.createEngine();
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -            host = embedded.createHost("localhost", home + "/webapps"); //$NON-NLS-1$ //$NON-NLS-2$
    Andrew Overholt 185a712
    +            host = embedded.createHost(hostname, home + "/webapps"); //$NON-NLS-1$ //$NON-NLS-2$
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
                 // all request go to our only host
    Andrew Overholt 185a712
                 engine.setDefaultHost(host.getName());
    Andrew Overholt d1b3f45
    @@ -136,123 +169,112 @@
    Andrew Overholt 185a712
                             .setErrorReportValveClass("org.eclipse.tomcat.internal.EclipseErrorReportValve"); //$NON-NLS-1$
    Andrew Overholt 185a712
                 }
    Andrew Overholt 185a712
                 engine.addChild(host);
    Andrew Overholt 185a712
    -
    Andrew Overholt d1b3f45
    -            // Install the assembled container hierarchy
    Andrew Overholt d1b3f45
    -            PrintStream sysOut = System.out;
    Andrew Overholt d1b3f45
    -            // reassign standard output to prevent Tomcat from writing
    Andrew Overholt d1b3f45
    -            // its version message there.
    Andrew Overholt d1b3f45
    -            System.setOut(new PrintStream(new ByteArrayOutputStream()));
    Andrew Overholt 185a712
    +            
    Andrew Overholt d1b3f45
                 try {
    Andrew Overholt 185a712
                     embedded.addEngine(engine);
    Andrew Overholt 185a712
                 } finally {
    Andrew Overholt d1b3f45
    -                System.setOut(sysOut);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -
    Andrew Overholt d1b3f45
    +                System.setErr(sysErr);
    Andrew Overholt 185a712
    +            }           
    Andrew Overholt 185a712
    +            
    Andrew Overholt 185a712
                 // Root context
    Andrew Overholt 185a712
                 Context root = embedded.createContext("", home + "/webapps/ROOT"); //$NON-NLS-1$ //$NON-NLS-2$
    Andrew Overholt 185a712
                 // this line should be replaced once tomcat provides support
    Andrew Overholt d1b3f45
                 // for setting the working directory
    Andrew Overholt d1b3f45
                 if (root instanceof StandardContext) {
    Andrew Overholt d1b3f45
    -                ((StandardContext) root)
    Andrew Overholt d1b3f45
    -                        .setWorkDir(getWorkingDirectory("ROOT")); //$NON-NLS-1$
    Andrew Overholt d1b3f45
    +            	StandardContext standardContext = (StandardContext) root;
    Andrew Overholt d1b3f45
    +            	standardContext.setWorkDir(getWorkingDirectory("ROOT")); //$NON-NLS-1$
    Andrew Overholt d1b3f45
    +            	standardContext.setSaveConfig(false);
    Andrew Overholt 185a712
                 }
    Andrew Overholt 185a712
    +            
    Andrew Overholt 185a712
                 root.setLoader(embedded.createLoader(this.getClass()
    Andrew Overholt 185a712
                         .getClassLoader()));
    Andrew Overholt 185a712
    -            contexts.add(root);
    Andrew Overholt 185a712
    -            host.addChild(root);
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -            InetAddress iAddress = null;
    Andrew Overholt 185a712
    -            if (this.hostAddress != null) {
    Andrew Overholt 185a712
    -                try {
    Andrew Overholt 185a712
    -                    iAddress = InetAddress.getByName(this.hostAddress);
    Andrew Overholt 185a712
    -                } catch (UnknownHostException uhe) {
    Andrew Overholt 185a712
    -                    // will default to all interfaces
    Andrew Overholt 185a712
    -                }
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    +            host.addChild(root);
    Andrew Overholt 185a712
    +            contexts.add(root);
    Andrew Overholt 185a712
    +            
    Andrew Overholt 185a712
                 updateSslPort(iAddress);
    Andrew Overholt 185a712
                 if (this.port == 0) {
    Andrew Overholt 185a712
    -                this.port = SocketUtil.findUnusedLocalPort(iAddress); //$NON-NLS-1$
    Andrew Overholt 185a712
    +                this.port = SocketUtil.findUnusedLocalPort(iAddress);
    Andrew Overholt 185a712
                     if (this.port == -1) {
    Andrew Overholt 185a712
                         throw new CoreException(
    Andrew Overholt 185a712
                                 new Status(
    Andrew Overholt 185a712
                                         IStatus.ERROR,
    Andrew Overholt 185a712
                                         TomcatPlugin.PLUGIN_ID,
    Andrew Overholt 185a712
                                         IStatus.OK,
    Andrew Overholt 185a712
    -                                    TomcatResources.TomcatAppServer_start_CannotObtainPort, //$NON-NLS-1$
    Andrew Overholt 185a712
    +                                    TomcatResources.TomcatAppServer_start_CannotObtainPort,
    Andrew Overholt 185a712
                                         null));
    Andrew Overholt 185a712
                     }
    Andrew Overholt 185a712
                 }
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
                 // Create Connector
    Andrew Overholt 185a712
    -            Connector connector = embedded.createConnector(null, this.port,
    Andrew Overholt 185a712
    -                    false);
    Andrew Overholt 185a712
    -            // Override defaults on CoyoteConnector
    Andrew Overholt 185a712
    -            if (connector instanceof CoyoteConnector) {
    Andrew Overholt 185a712
    -                CoyoteConnector connectorImpl = (CoyoteConnector) connector;
    Andrew Overholt 185a712
    -                if (iAddress != null) {
    Andrew Overholt 185a712
    -                    // bug in Embedded that incorrectly sets host on connector.
    Andrew Overholt 185a712
    -                    // pass null when creating connector, and set host here if
    Andrew Overholt 185a712
    -                    // it is specified
    Andrew Overholt 185a712
    -                    connectorImpl.setAddress(iAddress.getHostAddress());
    Andrew Overholt 185a712
    -                }
    Andrew Overholt 185a712
    -                Preferences pref = TomcatPlugin.getDefault()
    Andrew Overholt 185a712
    -                        .getPluginPreferences();
    Andrew Overholt 185a712
    -                int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT);
    Andrew Overholt 185a712
    -                if (acceptCount > 0) {
    Andrew Overholt 185a712
    -                    connectorImpl.setAcceptCount(acceptCount);
    Andrew Overholt 185a712
    -                }
    Andrew Overholt 185a712
    -                int maxProcessors = pref
    Andrew Overholt 185a712
    -                        .getInt(TomcatPlugin.PREF_MAX_PROCESSORS);
    Andrew Overholt 185a712
    -                if (maxProcessors > 0) {
    Andrew Overholt 185a712
    -                    connectorImpl.setMaxProcessors(maxProcessors);
    Andrew Overholt 185a712
    -                }
    Andrew Overholt 185a712
    -                int minProcessors = pref
    Andrew Overholt 185a712
    -                        .getInt(TomcatPlugin.PREF_MIN_PROCESSORS);
    Andrew Overholt 185a712
    -                if (minProcessors > 0) {
    Andrew Overholt 185a712
    -                    connectorImpl.setMinProcessors(minProcessors);
    Andrew Overholt 185a712
    -                }
    Andrew Overholt 185a712
    -                if (this.sslPort > 0) {
    Andrew Overholt 185a712
    -                    connectorImpl.setRedirectPort(this.sslPort);
    Andrew Overholt 185a712
    -                    connectorImpl.setEnableLookups(true);
    Andrew Overholt 185a712
    -                    connectorImpl.setConnectionTimeout(20000);
    Andrew Overholt 185a712
    -                    connectorImpl.setUseURIValidationHack(false);
    Andrew Overholt 185a712
    -                    connectorImpl.setDisableUploadTimeout(true);
    Andrew Overholt 185a712
    -                }
    Andrew Overholt 185a712
    -                // connectorImpl.setDebug(0);
    Andrew Overholt 185a712
    -                // If there is problem in embedded.addConnector()
    Andrew Overholt 185a712
    -                // there is no exception, so add a listener
    Andrew Overholt 185a712
    -                connectorImpl.addLifecycleListener(new LifecycleListener() {
    Andrew Overholt 185a712
    -                    public void lifecycleEvent(LifecycleEvent event) {
    Andrew Overholt 185a712
    -                        if ("start".equals(event.getType())) //$NON-NLS-1$
    Andrew Overholt 185a712
    -                            running = true;
    Andrew Overholt 185a712
    -                    }
    Andrew Overholt 185a712
    -                });
    Andrew Overholt d1b3f45
    +            Connector connector = embedded.createConnector(iAddress.getHostAddress(), this.port, false);
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +            Preferences pref = TomcatPlugin.getDefault()
    Andrew Overholt 185a712
    +                    .getPluginPreferences();
    Andrew Overholt 185a712
    +            /**
    Andrew Overholt 185a712
    +             * To extend additional properties, make use of org.apache.tomcat.util.IntrospectionUtils
    Andrew Overholt 185a712
    +             * A Connector will initialize a protocolhandler defaults to org.apache.coyote.http11.Http11Protocol
    Andrew Overholt 185a712
    +             * format : connector.setProperty("STRING_PROP_NAME","STRING_PROP_VALUE");
    Andrew Overholt 185a712
    +             *
    Andrew Overholt 185a712
    +             */
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +            int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT);
    Andrew Overholt 185a712
    +            if (acceptCount > 0) {
    Andrew Overholt 185a712
    +                connector.setProperty("backlog",""+acceptCount);
    Andrew Overholt d1b3f45
    +            }
    Andrew Overholt d1b3f45
    +
    Andrew Overholt 185a712
    +            int maxProcessors = pref
    Andrew Overholt 185a712
    +            .getInt(TomcatPlugin.PREF_MAX_PROCESSORS);
    Andrew Overholt 185a712
    +            if (maxProcessors > 0) {
    Andrew Overholt 185a712
    +            	connector.setProperty("maxThreads",""+maxProcessors);
    Andrew Overholt 185a712
    +            }
    Andrew Overholt 185a712
    +            
    Andrew Overholt 185a712
    +            int minProcessors = pref
    Andrew Overholt 185a712
    +            .getInt(TomcatPlugin.PREF_MIN_PROCESSORS);
    Andrew Overholt 185a712
    +            if (minProcessors > 0) {
    Andrew Overholt 185a712
    +            	connector.setProperty("minSpareThreads",""+minProcessors);
    Andrew Overholt 185a712
    +            }
    Andrew Overholt 185a712
    +            
    Andrew Overholt 185a712
    +            if (this.sslPort > 0) {
    Andrew Overholt 185a712
    +            	connector.setRedirectPort(this.sslPort);
    Andrew Overholt 185a712
    +            	connector.setEnableLookups(true);
    Andrew Overholt 185a712
    +            	connector.setProperty("soTimeout",""+20000);
    Andrew Overholt 185a712
    +            	// connector.setUseURIValidationHack(false); no longer available
    Andrew Overholt 185a712
    +            	connector.setUseBodyEncodingForURI(false);
    Andrew Overholt 185a712
    +            	String disableUploadTimeout = pref.getString(TomcatPlugin.DISABLE_UPLOAD_TIMEOUT);
    Andrew Overholt 185a712
    +            	if ((disableUploadTimeout != null) && (!("".equals(disableUploadTimeout.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +            		connector.setProperty("disableUploadTimeout", disableUploadTimeout);
    Andrew Overholt 185a712
    +            	}
    Andrew Overholt d1b3f45
                 }
    Andrew Overholt 185a712
    +            
    Andrew Overholt 185a712
    +            // connectorImpl.setDebug(0);
    Andrew Overholt 185a712
    +            // If there is problem in embedded.addConnector()
    Andrew Overholt 185a712
    +            // there is no exception, so add a listener
    Andrew Overholt 185a712
    +//            connector.addLifecycleListener(new LifecycleListener() {
    Andrew Overholt 185a712
    +//                public void lifecycleEvent(LifecycleEvent event) {
    Andrew Overholt 185a712
    +//                    if (Lifecycle.START_EVENT.equals(event.getType()))
    Andrew Overholt 185a712
    +//                        hasConnection = true;
    Andrew Overholt 185a712
    +//                }
    Andrew Overholt 185a712
    +//            });
    Andrew Overholt d1b3f45
     
    Andrew Overholt 185a712
                 // add Connector to Tomcat
    Andrew Overholt d1b3f45
    -            PrintStream sysErr = System.err;
    Andrew Overholt 185a712
                 // reassign standard error to prevent Coyote from writing
    Andrew Overholt 185a712
                 // its version message there.
    Andrew Overholt d1b3f45
    -            System.setErr(new PrintStream(new ByteArrayOutputStream()));
    Andrew Overholt d1b3f45
    +            System.setErr(newOutput);
    Andrew Overholt 185a712
                 try {
    Andrew Overholt 185a712
    -                embedded.addConnector(connector);
    Andrew Overholt 185a712
    -                httpConnector = connector;
    Andrew Overholt 185a712
    +                this.httpConnector = connector;
    Andrew Overholt 185a712
    +                embedded.addConnector(this.httpConnector);
    Andrew Overholt 185a712
    +                httpConnector.start();
    Andrew Overholt 185a712
                 } finally {
    Andrew Overholt 185a712
                     System.setErr(sysErr);
    Andrew Overholt 185a712
                 }
    Andrew Overholt 185a712
    -
    Andrew Overholt 185a712
                 if (this.sslPort > 0) {
    Andrew Overholt 185a712
                     createSSLConnector(iAddress, this.sslPort);
    Andrew Overholt 185a712
                 }
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
    -            // if null passed for hostAddress, use local host
    Andrew Overholt 185a712
    -            if (this.hostAddress == null) {
    Andrew Overholt 185a712
    -                this.hostAddress = "127.0.0.1"; //$NON-NLS-1$
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -
    Andrew Overholt 185a712
                 // running = true;
    Andrew Overholt 185a712
                 TomcatPlugin.getDefault().setAppserver(this);
    Andrew Overholt 185a712
    -
    Andrew Overholt 185a712
    +            
    Andrew Overholt 185a712
             } catch (Exception exc) {
    Andrew Overholt 185a712
                 TomcatPlugin
    Andrew Overholt 185a712
                         .logError(
    Andrew Overholt d1b3f45
    @@ -306,91 +328,145 @@
    Andrew Overholt 185a712
          * @throws CoreException
    Andrew Overholt 185a712
          */
    Andrew Overholt 185a712
         private void createSSLConnector(InetAddress iAddress, int sslport)
    Andrew Overholt 185a712
    -            throws CoreException {
    Andrew Overholt 185a712
    -        // Create Connector
    Andrew Overholt 185a712
    -        this.sslConnector = embedded.createConnector(null, sslport, false);
    Andrew Overholt 185a712
    -        // Override defaults on CoyoteConnector
    Andrew Overholt 185a712
    -        if (this.sslConnector instanceof CoyoteConnector) {
    Andrew Overholt 185a712
    -            CoyoteConnector connectorImpl = (CoyoteConnector) this.sslConnector;
    Andrew Overholt 185a712
    -            if (iAddress != null) {
    Andrew Overholt 185a712
    -                // bug in Embedded that incorrectly sets host on connector.
    Andrew Overholt 185a712
    -                // pass null when creating connector, and set host here if
    Andrew Overholt 185a712
    -                // it is specified
    Andrew Overholt 185a712
    -                connectorImpl.setAddress(iAddress.getHostAddress());
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            Preferences pref = TomcatPlugin.getDefault().getPluginPreferences();
    Andrew Overholt 185a712
    -            int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT);
    Andrew Overholt 185a712
    -            if (acceptCount > 0) {
    Andrew Overholt 185a712
    -                connectorImpl.setAcceptCount(acceptCount);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            int maxProcessors = pref.getInt(TomcatPlugin.PREF_MAX_PROCESSORS);
    Andrew Overholt 185a712
    -            if (maxProcessors > 0) {
    Andrew Overholt 185a712
    -                connectorImpl.setMaxProcessors(maxProcessors);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            int minProcessors = pref.getInt(TomcatPlugin.PREF_MIN_PROCESSORS);
    Andrew Overholt 185a712
    -            if (minProcessors > 0) {
    Andrew Overholt 185a712
    -                connectorImpl.setMinProcessors(minProcessors);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            connectorImpl.setUseURIValidationHack(false);
    Andrew Overholt 185a712
    -            connectorImpl.setDisableUploadTimeout(true);
    Andrew Overholt 185a712
    -            connectorImpl.setSecure(true);
    Andrew Overholt 185a712
    -            String scheme = pref.getString(TomcatPlugin.PREF_SSL_SCHEME);
    Andrew Overholt 185a712
    -            if ((scheme != null) && (!("".equals(scheme.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    -                connectorImpl.setScheme(scheme);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            connectorImpl.setEnableLookups(true);
    Andrew Overholt 185a712
    -            CoyoteServerSocketFactory factory = new CoyoteServerSocketFactory();
    Andrew Overholt 185a712
    -            factory.setClientAuth(false);
    Andrew Overholt 185a712
    -            String protocol = pref.getString(TomcatPlugin.PREF_SSL_PROTOCOL);
    Andrew Overholt 185a712
    -            if ((protocol != null) && (!("".equals(protocol.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    -                factory.setProtocol(protocol);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            String algorithm = pref.getString(TomcatPlugin.PREF_SSL_ALGORITHM);
    Andrew Overholt 185a712
    -            if ((algorithm != null) && (!("".equals(algorithm.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    -                factory.setAlgorithm(algorithm);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            String keyStoreFile = pref
    Andrew Overholt 185a712
    -                    .getString(TomcatPlugin.PREF_KEY_STORE_FILE);
    Andrew Overholt 185a712
    -            if ((keyStoreFile != null) && (!("".equals(keyStoreFile.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    -                factory.setKeystoreFile(keyStoreFile);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            String keyStorePassword = pref
    Andrew Overholt 185a712
    -                    .getString(TomcatPlugin.PREF_KEY_STORE_PASSWORD);
    Andrew Overholt 185a712
    -            if ((keyStorePassword != null)
    Andrew Overholt 185a712
    -                    && (!("".equals(keyStorePassword.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    -                factory.setKeystorePass(keyStorePassword);
    Andrew Overholt 185a712
    -            }
    Andrew Overholt 185a712
    -            connectorImpl.setFactory(factory);
    Andrew Overholt 185a712
    -            connectorImpl.setDebug(0);
    Andrew Overholt 185a712
    -            // If there is problem in embedded.addConnector()
    Andrew Overholt 185a712
    -            // there is no exception, so add a listener
    Andrew Overholt 185a712
    -            connectorImpl.addLifecycleListener(new LifecycleListener() {
    Andrew Overholt 185a712
    -                public void lifecycleEvent(LifecycleEvent event) {
    Andrew Overholt 185a712
    -                    if ("start".equals(event.getType())) //$NON-NLS-1$
    Andrew Overholt 185a712
    -                        running = true;
    Andrew Overholt 185a712
    -                }
    Andrew Overholt 185a712
    -            });
    Andrew Overholt 185a712
    -        }
    Andrew Overholt 185a712
    -
    Andrew Overholt 185a712
    -        // add Connector to Tomcat
    Andrew Overholt 185a712
    -        PrintStream sysErr = System.err;
    Andrew Overholt 185a712
    -        // reassign standard error to prevent Coyote from writing
    Andrew Overholt 185a712
    -        // its version message there.
    Andrew Overholt 185a712
    -        System.setErr(new PrintStream(new ByteArrayOutputStream()));
    Andrew Overholt 185a712
    -        try {
    Andrew Overholt 185a712
    -            embedded.addConnector(this.sslConnector);
    Andrew Overholt 185a712
    -        } finally {
    Andrew Overholt 185a712
    -            System.setErr(sysErr);
    Andrew Overholt 185a712
    -        }
    Andrew Overholt 185a712
    -    }
    Andrew Overholt 185a712
    -
    Andrew Overholt 185a712
    -    /**
    Andrew Overholt 185a712
    -     * Creates a {@link Realm}object using the information contained in
    Andrew Overholt 185a712
    -     * extensions of the type org.eclipse.tomcat.realmfactory in the plugin
    Andrew Overholt 185a712
    -     * registry.
    Andrew Overholt 185a712
    -     * 
    Andrew Overholt 185a712
    -     * @return the {@link Realm}object created
    Andrew Overholt 185a712
    -     */
    Andrew Overholt 185a712
    +			throws CoreException {
    Andrew Overholt 185a712
    +		// Create Connector
    Andrew Overholt 185a712
    +		// Defaults to local if iAddress is null
    Andrew Overholt 185a712
    +		Connector connector = embedded.createConnector(iAddress
    Andrew Overholt 185a712
    +				.getHostAddress(), this.port, false);
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +		// --------------------create the Protocol-----------------------//
    Andrew Overholt 185a712
    +		Preferences pref = TomcatPlugin.getDefault().getPluginPreferences();
    Andrew Overholt 185a712
    +		/**
    Andrew Overholt 185a712
    +		 * To extend additional properties, make use of
    Andrew Overholt 185a712
    +		 * org.apache.tomcat.util.IntrospectionUtils A Connector will initialize
    Andrew Overholt 185a712
    +		 * a protocolhandler which initialize a SSLImplementation which
    Andrew Overholt 185a712
    +		 * initialize a ServerSocketFactory format :
    Andrew Overholt 185a712
    +		 * connector.setProperty("STRING_PROP_NAME","STRING_PROP_VALUE");
    Andrew Overholt 185a712
    +		 * 
    Andrew Overholt 185a712
    +		 */
    Andrew Overholt 185a712
    +		// ----------------configure connector -------------------------------//
    Andrew Overholt 185a712
    +		// by looking at the code, it seems like the protocol go in first
    Andrew Overholt 185a712
    +		String protocol = pref.getString(TomcatPlugin.PREF_SSL_PROTOCOL);
    Andrew Overholt 185a712
    +		if ((protocol != null) && (!("".equals(protocol.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +			connector.setProperty("protocol", protocol);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +		String protocols = pref.getString(TomcatPlugin.PREF_SSL_PROTOCOLS);
    Andrew Overholt 185a712
    +		if ((protocols != null) && (!("".equals(protocols.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +			connector.setProperty("protocols", protocols);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +		String protocolClassName = Http11Protocol.class.getName();
    Andrew Overholt 185a712
    +		connector.setProtocol(protocolClassName);
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +		String JSSEImplementationName = JSSEImplementation.class.getName();
    Andrew Overholt 185a712
    +		connector.setProperty("sslImplementation", JSSEImplementationName);
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +		String disableUploadTimeout = pref
    Andrew Overholt 185a712
    +				.getString(TomcatPlugin.DISABLE_UPLOAD_TIMEOUT);
    Andrew Overholt 185a712
    +		if ((disableUploadTimeout != null)
    Andrew Overholt 185a712
    +				&& (!("".equals(disableUploadTimeout.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +			connector.setProperty("disableUploadTimeout", disableUploadTimeout);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +		String algorithm = pref.getString(TomcatPlugin.PREF_SSL_ALGORITHM);
    Andrew Overholt 185a712
    +		if ((algorithm != null) && (!("".equals(algorithm.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +			connector.setProperty("algorithm", algorithm);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +		int maxProcessors = pref.getInt(TomcatPlugin.PREF_MAX_PROCESSORS);
    Andrew Overholt 185a712
    +		if (maxProcessors > 0) {
    Andrew Overholt 185a712
    +			// connector.setMaxProcessors(maxProcessors);
    Andrew Overholt 185a712
    +			connector.setProperty("maxThreads", "" + maxProcessors);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +		int minProcessors = pref.getInt(TomcatPlugin.PREF_MIN_PROCESSORS);
    Andrew Overholt 185a712
    +		if (minProcessors > 0) {
    Andrew Overholt 185a712
    +			// connector.setMinProcessors(minProcessors);
    Andrew Overholt 185a712
    +			connector.setProperty("minSpareThreads", "" + minProcessors);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +		// this is making use of org.apache.tomcat.util.IntrospectionUtils
    Andrew Overholt 185a712
    +		connector.setProperty("disableUploadTimeout", "" + true);
    Andrew Overholt 185a712
    +		String clientauth = pref
    Andrew Overholt 185a712
    +				.getString(TomcatPlugin.PREF_CLIENT_AUTHENTICATION);
    Andrew Overholt 185a712
    +		if ((clientauth != null) && (!("".equals(clientauth.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +			connector.setProperty("clientauth", clientauth);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +		int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT);
    Andrew Overholt 185a712
    +		if (acceptCount > 0) {
    Andrew Overholt 185a712
    +			connector.setProperty("backlog", "" + acceptCount);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +		String keyStoreFile = pref.getString(TomcatPlugin.PREF_KEY_STORE_FILE);
    Andrew Overholt 185a712
    +		if ((keyStoreFile != null) && (!("".equals(keyStoreFile.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +			connector.setProperty("keystore", keyStoreFile);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +		String keyStorePassword = pref
    Andrew Overholt 185a712
    +				.getString(TomcatPlugin.PREF_KEY_STORE_PASSWORD);
    Andrew Overholt 185a712
    +		if ((keyStorePassword != null)
    Andrew Overholt 185a712
    +				&& (!("".equals(keyStorePassword.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +			connector.setProperty("keypass", keyStorePassword);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +		// connector.setUseURIValidationHack(false); --no longer avaliable, hope
    Andrew Overholt 185a712
    +		// they fixed the bug
    Andrew Overholt 185a712
    +		connector.setUseBodyEncodingForURI(false);
    Andrew Overholt 185a712
    +		// connector.setSecure(true); ---setting ssLImplementation set secure to
    Andrew Overholt 185a712
    +		// true
    Andrew Overholt 185a712
    +		String scheme = pref.getString(TomcatPlugin.PREF_SSL_SCHEME);
    Andrew Overholt 185a712
    +		if ((scheme != null) && (!("".equals(scheme.trim())))) { //$NON-NLS-1$
    Andrew Overholt 185a712
    +			connector.setScheme(scheme);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +		connector.setEnableLookups(true);
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +		// connector.setFactory(factory); --no longer needed, now handled by
    Andrew Overholt 185a712
    +		// SSLImplemenatation
    Andrew Overholt 185a712
    +		// If there is problem in embedded.addConnector()
    Andrew Overholt 185a712
    +		// there is no exception, so add a listener
    Andrew Overholt 185a712
    +//		connector.addLifecycleListener(new LifecycleListener() {
    Andrew Overholt 185a712
    +//			public void lifecycleEvent(LifecycleEvent event) {
    Andrew Overholt 185a712
    +//				if (Lifecycle.START_EVENT.equals(event.getType())
    Andrew Overholt 185a712
    +//						|| Lifecycle.PERIODIC_EVENT.equals(event.getType()))
    Andrew Overholt 185a712
    +//					hasSSLConnection = true;
    Andrew Overholt 185a712
    +//			}
    Andrew Overholt 185a712
    +//		});
    Andrew Overholt 185a712
    +		// add Connector to Tomcat
    Andrew Overholt 185a712
    +		PrintStream sysErr = System.err;
    Andrew Overholt 185a712
    +		// reassign standard error to prevent Coyote from writing
    Andrew Overholt 185a712
    +		// its version message there.
    Andrew Overholt d1b3f45
    +//		System.setErr(new PrintStream(new ByteArrayOutputStream()));
    Andrew Overholt d1b3f45
    +        PrintStream newOutput;
    Andrew Overholt d1b3f45
    +		try {
    Andrew Overholt d1b3f45
    +			newOutput = new PrintStream(new FileOutputStream(
    Andrew Overholt d1b3f45
    +					TomcatPlugin.getDefault().getStateLocation().toOSString()
    Andrew Overholt d1b3f45
    +					+ IPath.SEPARATOR + "tomcat.log"));
    Andrew Overholt d1b3f45
    +			System.setErr(newOutput);
    Andrew Overholt d1b3f45
    +		} catch (SecurityException e1) {
    Andrew Overholt d1b3f45
    +			e1.printStackTrace();
    Andrew Overholt d1b3f45
    +			System.setErr(new PrintStream(new ByteArrayOutputStream()));
    Andrew Overholt d1b3f45
    +		} catch (FileNotFoundException e1) {
    Andrew Overholt d1b3f45
    +			e1.printStackTrace();
    Andrew Overholt d1b3f45
    +			System.setErr(new PrintStream(new ByteArrayOutputStream()));
    Andrew Overholt d1b3f45
    +		} catch (IllegalStateException e1) {
    Andrew Overholt d1b3f45
    +			e1.printStackTrace();
    Andrew Overholt d1b3f45
    +			System.setErr(new PrintStream(new ByteArrayOutputStream()));
    Andrew Overholt d1b3f45
    +		} //$NON-NLS-1$
    Andrew Overholt 185a712
    +		try {
    Andrew Overholt 185a712
    +			sslConnector = connector;
    Andrew Overholt 185a712
    +			embedded.addConnector(this.sslConnector);
    Andrew Overholt 185a712
    +			sslConnector.start();
    Andrew Overholt 185a712
    +		} catch (LifecycleException e) {
    Andrew Overholt 185a712
    +			TomcatPlugin.logError(
    Andrew Overholt 185a712
    +					"Exception occurred while establishing secure connection.", //$NON-NLS-1$
    Andrew Overholt 185a712
    +					e);
    Andrew Overholt 185a712
    +		} finally {
    Andrew Overholt 185a712
    +			System.setErr(sysErr);
    Andrew Overholt 185a712
    +		}
    Andrew Overholt 185a712
    +	}
    Andrew Overholt 185a712
    +
    Andrew Overholt 185a712
    +    /**
    Andrew Overholt 185a712
    +	 * Creates a {@link Realm}object using the information contained in
    Andrew Overholt 185a712
    +	 * extensions of the type org.eclipse.tomcat.realmfactory in the plugin
    Andrew Overholt 185a712
    +	 * registry.
    Andrew Overholt 185a712
    +	 * 
    Andrew Overholt 185a712
    +	 * @return the {@link Realm}object created
    Andrew Overholt 185a712
    +	 */
    Andrew Overholt 185a712
         private Realm getRealm() {
    Andrew Overholt 185a712
             IExtensionRegistry registry = Platform.getExtensionRegistry();
    Andrew Overholt 185a712
             IExtensionPoint extensionPoint = registry.getExtensionPoint(
    Andrew Overholt d1b3f45
    @@ -477,10 +553,11 @@
    Andrew Overholt d1b3f45
             }
    Andrew Overholt d1b3f45
             try {
    Andrew Overholt d1b3f45
                 Context context = embedded.createContext(contextPath, path
    Andrew Overholt d1b3f45
    -                    .toOSString());
    Andrew Overholt d1b3f45
    +            		.toOSString());
    Andrew Overholt d1b3f45
                 if (context instanceof StandardContext) {
    Andrew Overholt d1b3f45
    -                ((StandardContext) context)
    Andrew Overholt d1b3f45
    -                        .setWorkDir(getWorkingDirectory(webappName));
    Andrew Overholt d1b3f45
    +				StandardContext standardContext = (StandardContext) context;
    Andrew Overholt d1b3f45
    +				standardContext.setWorkDir(getWorkingDirectory(webappName));
    Andrew Overholt d1b3f45
    +				standardContext.setSaveConfig(false);
    Andrew Overholt d1b3f45
                 }
    Andrew Overholt d1b3f45
     
    Andrew Overholt d1b3f45
                 WebAppClassLoader webappLoader = new WebAppClassLoader(customLoader);
    Andrew Overholt 185a712
    Index: src/org/eclipse/tomcat/internal/TomcatPlugin.java
    Andrew Overholt 185a712
    ===================================================================
    Andrew Overholt 185a712
    RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/TomcatPlugin.java,v
    Andrew Overholt 185a712
    retrieving revision 1.24
    Andrew Overholt 185a712
    diff -u -r1.24 TomcatPlugin.java
    Andrew Overholt 185a712
    --- src/org/eclipse/tomcat/internal/TomcatPlugin.java	23 May 2005 03:58:20 -0000	1.24
    Andrew Overholt d1b3f45
    +++ src/org/eclipse/tomcat/internal/TomcatPlugin.java	6 Mar 2006 21:10:40 -0000
    Andrew Overholt 185a712
    @@ -24,13 +24,16 @@
    Andrew Overholt 185a712
     	public final static String PREF_ACCEPT_COUNT = "acceptCount"; //$NON-NLS-1$
    Andrew Overholt 185a712
     	public final static String PREF_MAX_PROCESSORS = "maxProcessors"; //$NON-NLS-1$
    Andrew Overholt 185a712
     	public final static String PREF_MIN_PROCESSORS = "minProcessors"; //$NON-NLS-1$
    Andrew Overholt 185a712
    +	public final static String DISABLE_UPLOAD_TIMEOUT = "disableUploadTimeout"; //$NON-NLS-1$
    Andrew Overholt 185a712
     
    Andrew Overholt 185a712
     	public final static String PREF_SSL_PORT = "sslPort"; //$NON-NLS-1$
    Andrew Overholt 185a712
     	public final static String PREF_SSL_PROTOCOL = "sslProtocol"; //$NON-NLS-1$
    Andrew Overholt 185a712
    +	public final static String PREF_SSL_PROTOCOLS = "sslProtocols"; //$NON-NLS-1$
    Andrew Overholt 185a712
     	public final static String PREF_SSL_SCHEME = "sslScheme"; //$NON-NLS-1$
    Andrew Overholt 185a712
     	public final static String PREF_SSL_ALGORITHM = "sslAlgorithm"; //$NON-NLS-1$
    Andrew Overholt 185a712
     	public final static String PREF_KEY_STORE_FILE = "keyStoreFile"; //$NON-NLS-1$
    Andrew Overholt 185a712
     	public final static String PREF_KEY_STORE_PASSWORD = "keyStorePassword"; //$NON-NLS-1$
    Andrew Overholt 185a712
    +	public final static String PREF_CLIENT_AUTHENTICATION = "clientauth"; //$NON-NLS-1$
    Andrew Overholt 185a712
     	
    Andrew Overholt 185a712
     	private static TomcatPlugin plugin;
    Andrew Overholt 185a712
     //	private static BundleContext bundleContext;
    Andrew Overholt d1b3f45
    @@ -63,6 +66,9 @@
    Andrew Overholt d1b3f45
     	}
    Andrew Overholt d1b3f45
     
    Andrew Overholt d1b3f45
     	public static TomcatPlugin getDefault() {
    Andrew Overholt d1b3f45
    +		if (plugin == null) {
    Andrew Overholt d1b3f45
    +			plugin = new TomcatPlugin();
    Andrew Overholt d1b3f45
    +		}
    Andrew Overholt d1b3f45
     		return plugin;
    Andrew Overholt d1b3f45
     	}
    Andrew Overholt d1b3f45