More tomcat 5.5 fixes merged from head patch.

This commit is contained in:
Andrew Overholt 2006-03-06 21:17:35 +00:00
parent 907e15b3e2
commit d1b3f45301
2 changed files with 143 additions and 61 deletions

View File

@ -4,7 +4,7 @@ RCS file: /cvsroot/eclipse/org.eclipse.tomcat/.classpath,v
retrieving revision 1.20
diff -u -r1.20 .classpath
--- .classpath 21 Apr 2005 23:31:58 -0000 1.20
+++ .classpath 28 Feb 2006 22:56:26 -0000
+++ .classpath 6 Mar 2006 21:10:23 -0000
@@ -1,29 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
@ -31,22 +31,21 @@ diff -u -r1.20 .classpath
- <classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="tomcat-coyote.jar"/>
- <classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="tomcat-http11.jar"/>
- <classpathentry exported="true" sourcepath="D:/tomcat4.1.30src" kind="lib" path="tomcat-util.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="catalina.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="bootstrap.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="commons-beanutils.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="commons-collections.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="commons-digester.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="commons-modeler.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="jakarta-regexp-1.3.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="jasper-compiler.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="jasper-runtime.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="mx4j-jmx.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="naming-factory.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="naming-resources.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="servlets-default.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="servlets-invoker.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="tomcat-coyote.jar"/>
+ <classpathentry kind="lib" exported="true" sourcepath="D:/tomcat4.1.30src" path="tomcat-util.jar"/>
+ <classpathentry exported="true" kind="lib" path="catalina.jar"/>
+ <classpathentry exported="true" kind="lib" path="bootstrap.jar"/>
+ <classpathentry exported="true" kind="lib" path="commons-beanutils.jar"/>
+ <classpathentry exported="true" kind="lib" path="commons-collections.jar"/>
+ <classpathentry exported="true" kind="lib" path="commons-digester.jar"/>
+ <classpathentry exported="true" kind="lib" path="commons-modeler.jar"/>
+ <classpathentry exported="true" kind="lib" path="jasper-compiler.jar"/>
+ <classpathentry exported="true" kind="lib" path="jasper-runtime.jar"/>
+ <classpathentry exported="true" kind="lib" path="mx4j-jmx.jar"/>
+ <classpathentry exported="true" kind="lib" path="naming-factory.jar"/>
+ <classpathentry exported="true" kind="lib" path="naming-resources.jar"/>
+ <classpathentry exported="true" kind="lib" path="servlets-default.jar"/>
+ <classpathentry exported="true" kind="lib" path="servlets-invoker.jar"/>
+ <classpathentry exported="true" kind="lib" path="tomcat-coyote.jar"/>
+ <classpathentry exported="true" kind="lib" path="tomcat-util.jar"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="commons-dbcp.jar"/>
@ -62,6 +61,7 @@ diff -u -r1.20 .classpath
+ <classpathentry kind="lib" path="catalina-optional.jar"/>
+ <classpathentry kind="lib" path="tomcat-http.jar"/>
+ <classpathentry kind="lib" path="servletapi5.jar"/>
+ <classpathentry kind="lib" path="regexp-1.3.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Index: about.html
@ -70,7 +70,7 @@ RCS file: /cvsroot/eclipse/org.eclipse.tomcat/about.html,v
retrieving revision 1.24
diff -u -r1.24 about.html
--- about.html 21 Jun 2005 00:52:06 -0000 1.24
+++ about.html 28 Feb 2006 22:56:26 -0000
+++ about.html 6 Mar 2006 21:10:23 -0000
@@ -8,7 +8,7 @@
<body lang="EN-US">
<h2>About This Content</h2>
@ -167,31 +167,27 @@ RCS file: /cvsroot/eclipse/org.eclipse.tomcat/META-INF/MANIFEST.MF,v
retrieving revision 1.14
diff -u -r1.14 MANIFEST.MF
--- META-INF/MANIFEST.MF 19 May 2005 04:05:11 -0000 1.14
+++ META-INF/MANIFEST.MF 28 Feb 2006 22:56:42 -0000
@@ -2,29 +2,34 @@
+++ META-INF/MANIFEST.MF 6 Mar 2006 21:10:40 -0000
@@ -2,30 +2,34 @@
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.tomcat; singleton:=true
-Bundle-Version: 4.1.30.1
-Bundle-ClassPath: tomcatwrapper.jar,
+Bundle-Version: 5.5.15
+Bundle-ClassPath: bootstrap.jar,
+ catalina-optional.jar,
+Bundle-ClassPath: catalina-optional.jar,
catalina.jar,
- bootstrap.jar,
commons-beanutils.jar,
commons-collections.jar,
+ commons-dbcp.jar,
+ commons-digester-rss.jar,
commons-digester.jar,
- commons-logging-api.jar,
+ commons-el.jar,
+ commons-fileupload.jar,
+ commons-launcher.jar,
+ commons-logging.jar,
commons-logging-api.jar,
commons-modeler.jar,
+ commons-pool.jar,
jakarta-regexp-1.3.jar,
- jakarta-regexp-1.3.jar,
+ regexp-1.3.jar,
jasper-compiler.jar,
jasper-runtime.jar,
+ jspapi.jar,
@ -208,21 +204,38 @@ diff -u -r1.14 MANIFEST.MF
- servlets-manager.jar,
tomcat-coyote.jar,
- tomcat-http11.jar,
- tomcat-util.jar
+ tomcat-http.jar,
tomcat-util.jar
+ tomcat-util.jar,
+ regexp-1.3.jar,
+ servletapi5.jar,
+ log4j.jar
Bundle-Activator: org.eclipse.tomcat.internal.TomcatPlugin
Bundle-Vendor: %providerName
@@ -54,8 +59,6 @@
Bundle-Localization: plugin
@@ -54,8 +58,7 @@
mx4j.util;x-internal:=true,
org.apache.catalina;x-internal:=true,
org.apache.catalina.connector;x-internal:=true,
- org.apache.catalina.connector.http;x-internal:=true,
- org.apache.catalina.connector.http10;x-internal:=true,
+ org.apache.catalina.core;x-internal:=true,
org.apache.catalina.realm;x-internal:=true,
org.apache.catalina.servlets;x-internal:=true,
org.apache.commons.beanutils;x-internal:=true,
@@ -82,10 +85,9 @@
org.apache.coyote.tomcat4;x-internal:=true,
@@ -69,7 +72,6 @@
org.apache.commons.digester.rss;x-internal:=true,
org.apache.commons.digester.xmlrules;x-internal:=true,
org.apache.commons.logging;x-internal:=true,
- org.apache.commons.logging.impl;x-internal:=true,
org.apache.commons.modeler;x-internal:=true,
org.apache.commons.modeler.ant;x-internal:=true,
org.apache.commons.modeler.mbeans;x-internal:=true,
@@ -79,13 +81,11 @@
org.apache.coyote.http11;x-internal:=true,
org.apache.coyote.http11.filters;x-internal:=true,
org.apache.coyote.memory;x-internal:=true,
- org.apache.coyote.tomcat4;x-internal:=true,
org.apache.jasper;x-internal:=true,
org.apache.jasper.compiler;x-internal:=true,
- org.apache.jasper.logging;x-internal:=true,
@ -233,10 +246,11 @@ diff -u -r1.14 MANIFEST.MF
org.apache.jasper.xmlparser;x-internal:=true,
org.apache.naming;x-internal:=true,
org.apache.naming.factory;x-internal:=true,
@@ -96,11 +98,9 @@
@@ -95,12 +95,9 @@
org.apache.tomcat.util;x-internal:=true,
org.apache.tomcat.util.buf;x-internal:=true,
org.apache.tomcat.util.collections;x-internal:=true,
org.apache.tomcat.util.compat;x-internal:=true,
- org.apache.tomcat.util.compat;x-internal:=true,
- org.apache.tomcat.util.handler;x-internal:=true,
org.apache.tomcat.util.http;x-internal:=true,
org.apache.tomcat.util.http.mapper;x-internal:=true,
@ -251,7 +265,7 @@ RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/Ec
retrieving revision 1.8
diff -u -r1.8 EclipseErrorReportValve.java
--- src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java 23 May 2005 03:58:04 -0000 1.8
+++ src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java 28 Feb 2006 22:56:42 -0000
+++ src/org/eclipse/tomcat/internal/EclipseErrorReportValve.java 6 Mar 2006 21:10:40 -0000
@@ -69,15 +69,27 @@
package org.eclipse.tomcat.internal;
@ -371,8 +385,16 @@ RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/To
retrieving revision 1.43
diff -u -r1.43 TomcatAppServer.java
--- src/org/eclipse/tomcat/internal/TomcatAppServer.java 22 Jun 2005 15:29:56 -0000 1.43
+++ src/org/eclipse/tomcat/internal/TomcatAppServer.java 28 Feb 2006 22:56:42 -0000
@@ -17,21 +17,21 @@
+++ src/org/eclipse/tomcat/internal/TomcatAppServer.java 6 Mar 2006 21:10:40 -0000
@@ -11,27 +11,29 @@
package org.eclipse.tomcat.internal;
import java.io.ByteArrayOutputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
import java.io.PrintStream;
import java.net.InetAddress;
import java.net.URL;
import java.net.UnknownHostException;
import java.util.ArrayList;
@ -398,7 +420,7 @@ diff -u -r1.43 TomcatAppServer.java
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
@@ -91,27 +91,39 @@
@@ -91,27 +93,40 @@
* java.lang.String)
*/
public synchronized void start(int port, String hostAddress) throws CoreException {
@ -443,6 +465,7 @@ diff -u -r1.43 TomcatAppServer.java
- String base = home;
- System.setProperty("catalina.base", base); //$NON-NLS-1$
+ embedded = new Embedded(new MemoryRealm());
+ embedded.setRedirectStreams(true);
+ URL installURL = TomcatPlugin.getDefault().getBundle()
+ .getEntry("/"); //$NON-NLS-1$
+ URL resolvedURL = Platform.resolve(installURL);
@ -453,7 +476,7 @@ diff -u -r1.43 TomcatAppServer.java
// Set up realm if one found
if (TomcatPlugin.getDefault().getPluginPreferences().getInt(
@@ -119,14 +131,22 @@
@@ -119,14 +134,32 @@
Realm realm = getRealm();
embedded.setRealm(realm);
}
@ -466,10 +489,20 @@ diff -u -r1.43 TomcatAppServer.java
+ }
+ });
+
+ // Install the assembled container hierarchy
+ PrintStream sysErr = System.err;
+ // reassign standard error to prevent Tomcat from writing
+ // its version message there.
+ PrintStream newOutput = new PrintStream(new FileOutputStream(
+ TomcatPlugin.getDefault().getStateLocation().toOSString()
+ + IPath.SEPARATOR + "tomcat.log")); //$NON-NLS-1$
+ System.setErr(newOutput);
+
+ embedded.setRedirectStreams(true);
// start now, and then add all the contexts..
embedded.start();
-
+
// Create a very basic container hierarchy
engine = embedded.createEngine();
@ -478,29 +511,36 @@ diff -u -r1.43 TomcatAppServer.java
// all request go to our only host
engine.setDefaultHost(host.getName());
@@ -136,7 +156,7 @@
@@ -136,123 +169,112 @@
.setErrorReportValveClass("org.eclipse.tomcat.internal.EclipseErrorReportValve"); //$NON-NLS-1$
}
engine.addChild(host);
-
- // Install the assembled container hierarchy
- PrintStream sysOut = System.out;
- // reassign standard output to prevent Tomcat from writing
- // its version message there.
- System.setOut(new PrintStream(new ByteArrayOutputStream()));
+
// Install the assembled container hierarchy
PrintStream sysOut = System.out;
// reassign standard output to prevent Tomcat from writing
@@ -146,8 +166,8 @@
try {
embedded.addEngine(engine);
} finally {
System.setOut(sysOut);
- System.setOut(sysOut);
- }
-
+ System.setErr(sysErr);
+ }
+
// Root context
Context root = embedded.createContext("", home + "/webapps/ROOT"); //$NON-NLS-1$ //$NON-NLS-2$
// this line should be replaced once tomcat provides support
@@ -156,103 +176,97 @@
((StandardContext) root)
.setWorkDir(getWorkingDirectory("ROOT")); //$NON-NLS-1$
// for setting the working directory
if (root instanceof StandardContext) {
- ((StandardContext) root)
- .setWorkDir(getWorkingDirectory("ROOT")); //$NON-NLS-1$
+ StandardContext standardContext = (StandardContext) root;
+ standardContext.setWorkDir(getWorkingDirectory("ROOT")); //$NON-NLS-1$
+ standardContext.setSaveConfig(false);
}
+
root.setLoader(embedded.createLoader(this.getClass()
@ -579,7 +619,7 @@ diff -u -r1.43 TomcatAppServer.java
- running = true;
- }
- });
+ Connector connector = embedded.createConnector(iAddress.getHostAddress(), this.port,false);;
+ Connector connector = embedded.createConnector(iAddress.getHostAddress(), this.port, false);
+
+ Preferences pref = TomcatPlugin.getDefault()
+ .getPluginPreferences();
@ -593,8 +633,8 @@ diff -u -r1.43 TomcatAppServer.java
+ int acceptCount = pref.getInt(TomcatPlugin.PREF_ACCEPT_COUNT);
+ if (acceptCount > 0) {
+ connector.setProperty("backlog",""+acceptCount);
}
+ }
+
+ int maxProcessors = pref
+ .getInt(TomcatPlugin.PREF_MAX_PROCESSORS);
+ if (maxProcessors > 0) {
@ -617,7 +657,7 @@ diff -u -r1.43 TomcatAppServer.java
+ if ((disableUploadTimeout != null) && (!("".equals(disableUploadTimeout.trim())))) { //$NON-NLS-1$
+ connector.setProperty("disableUploadTimeout", disableUploadTimeout);
+ }
+ }
}
+
+ // connectorImpl.setDebug(0);
+ // If there is problem in embedded.addConnector()
@ -628,12 +668,13 @@ diff -u -r1.43 TomcatAppServer.java
+// hasConnection = true;
+// }
+// });
+
// add Connector to Tomcat
PrintStream sysErr = System.err;
- PrintStream sysErr = System.err;
// reassign standard error to prevent Coyote from writing
// its version message there.
System.setErr(new PrintStream(new ByteArrayOutputStream()));
- System.setErr(new PrintStream(new ByteArrayOutputStream()));
+ System.setErr(newOutput);
try {
- embedded.addConnector(connector);
- httpConnector = connector;
@ -660,7 +701,7 @@ diff -u -r1.43 TomcatAppServer.java
} catch (Exception exc) {
TomcatPlugin
.logError(
@@ -306,91 +320,129 @@
@@ -306,91 +328,145 @@
* @throws CoreException
*/
private void createSSLConnector(InetAddress iAddress, int sslport)
@ -851,7 +892,23 @@ diff -u -r1.43 TomcatAppServer.java
+ PrintStream sysErr = System.err;
+ // reassign standard error to prevent Coyote from writing
+ // its version message there.
+ System.setErr(new PrintStream(new ByteArrayOutputStream()));
+// System.setErr(new PrintStream(new ByteArrayOutputStream()));
+ PrintStream newOutput;
+ try {
+ newOutput = new PrintStream(new FileOutputStream(
+ TomcatPlugin.getDefault().getStateLocation().toOSString()
+ + IPath.SEPARATOR + "tomcat.log"));
+ System.setErr(newOutput);
+ } catch (SecurityException e1) {
+ e1.printStackTrace();
+ System.setErr(new PrintStream(new ByteArrayOutputStream()));
+ } catch (FileNotFoundException e1) {
+ e1.printStackTrace();
+ System.setErr(new PrintStream(new ByteArrayOutputStream()));
+ } catch (IllegalStateException e1) {
+ e1.printStackTrace();
+ System.setErr(new PrintStream(new ByteArrayOutputStream()));
+ } //$NON-NLS-1$
+ try {
+ sslConnector = connector;
+ embedded.addConnector(this.sslConnector);
@ -875,13 +932,28 @@ diff -u -r1.43 TomcatAppServer.java
private Realm getRealm() {
IExtensionRegistry registry = Platform.getExtensionRegistry();
IExtensionPoint extensionPoint = registry.getExtensionPoint(
@@ -477,10 +553,11 @@
}
try {
Context context = embedded.createContext(contextPath, path
- .toOSString());
+ .toOSString());
if (context instanceof StandardContext) {
- ((StandardContext) context)
- .setWorkDir(getWorkingDirectory(webappName));
+ StandardContext standardContext = (StandardContext) context;
+ standardContext.setWorkDir(getWorkingDirectory(webappName));
+ standardContext.setSaveConfig(false);
}
WebAppClassLoader webappLoader = new WebAppClassLoader(customLoader);
Index: src/org/eclipse/tomcat/internal/TomcatPlugin.java
===================================================================
RCS file: /cvsroot/eclipse/org.eclipse.tomcat/src/org/eclipse/tomcat/internal/TomcatPlugin.java,v
retrieving revision 1.24
diff -u -r1.24 TomcatPlugin.java
--- src/org/eclipse/tomcat/internal/TomcatPlugin.java 23 May 2005 03:58:20 -0000 1.24
+++ src/org/eclipse/tomcat/internal/TomcatPlugin.java 28 Feb 2006 22:56:42 -0000
+++ src/org/eclipse/tomcat/internal/TomcatPlugin.java 6 Mar 2006 21:10:40 -0000
@@ -24,13 +24,16 @@
public final static String PREF_ACCEPT_COUNT = "acceptCount"; //$NON-NLS-1$
public final static String PREF_MAX_PROCESSORS = "maxProcessors"; //$NON-NLS-1$
@ -899,3 +971,13 @@ diff -u -r1.24 TomcatPlugin.java
private static TomcatPlugin plugin;
// private static BundleContext bundleContext;
@@ -63,6 +66,9 @@
}
public static TomcatPlugin getDefault() {
+ if (plugin == null) {
+ plugin = new TomcatPlugin();
+ }
return plugin;
}

View File

@ -4,7 +4,7 @@ RCS file: /cvsroot/eclipse/org.eclipse.help.webapp/build.properties,v
retrieving revision 1.32
diff -u -r1.32 build.properties
--- build.properties 18 Mar 2005 08:00:28 -0000 1.32
+++ build.properties 28 Feb 2006 22:52:35 -0000
+++ build.properties 6 Mar 2006 21:10:11 -0000
@@ -33,5 +33,5 @@
../org.eclipse.help.appserver/bin,\
../org.eclipse.help.appserver,\
@ -18,7 +18,7 @@ RCS file: /cvsroot/eclipse/org.eclipse.help.webapp/build.xml,v
retrieving revision 1.65
diff -u -r1.65 build.xml
--- build.xml 18 Mar 2005 07:55:40 -0000 1.65
+++ build.xml 28 Feb 2006 22:52:35 -0000
+++ build.xml 6 Mar 2006 21:10:12 -0000
@@ -126,7 +126,7 @@
<pathelement path="../org.eclipse.help"/>
<pathelement path="../org.eclipse.help.base"/>