[214175] Fix handling of java.endorsed.dirs VM runtime argument so Tomcat 6.0 has the correct value.
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java
index f10aa54..066c4cc 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/ITomcatVersionHandler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -168,4 +168,13 @@
* @return true if this server supports separate context files
*/
public boolean supportsSeparateContextFiles();
+
+ /**
+ * Returns the endorsed directories derived using the
+ * specified install path.
+ *
+ * @param installPath installation path for the server
+ * @return The endorsed directories for this server.
+ */
+ public String getEndorsedDirectories(IPath installPath);
}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java
index be07bff..f6f749d 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat32Handler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -186,4 +186,12 @@
public boolean supportsSeparateContextFiles() {
return false;
}
+
+ /**
+ * @see ITomcatVersionHandler#getEndorsedDirectories(IPath)
+ */
+ public String getEndorsedDirectories(IPath installPath) {
+ return "";
+ }
+
}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java
index be5d24e..b0ab813 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat40Handler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -93,9 +93,7 @@
list.add("-Dcatalina.home=\"" + installPath.toOSString() + "\"");
// Include a system property for the configurable deploy location
list.add("-Dwtp.deploy=\"" + deployPath.toOSString() + "\"");
- String endorsed = installPath.append("bin").toOSString() +
- installPath.append("common").append("lib").toOSString();
- list.add("-Djava.endorsed.dirs=\"" + endorsed + "\"");
+ list.add("-Djava.endorsed.dirs=\"" + getEndorsedDirectories(installPath) + "\"");
String[] s = new String[list.size()];
list.toArray(s);
@@ -181,4 +179,14 @@
public boolean supportsSeparateContextFiles() {
return false;
}
+
+ /**
+ * @see ITomcatVersionHandler#getEndorsedDirectories(IPath)
+ */
+ public String getEndorsedDirectories(IPath installPath) {
+ return installPath.append("bin").toOSString() +
+ java.io.File.pathSeparator +
+ installPath.append("common").append("lib").toOSString();
+ }
+
}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java
index d4c6bd2..64a3dbd 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat41Handler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -85,7 +85,7 @@
* @see ITomcatVersionHandler#getRuntimeVMArguments(IPath, IPath, IPath, boolean)
*/
public String[] getRuntimeVMArguments(IPath installPath, IPath configPath, IPath deployPath, boolean isTestEnv) {
- return TomcatVersionHelper.getCatalinaVMArguments(installPath, configPath, deployPath, isTestEnv);
+ return TomcatVersionHelper.getCatalinaVMArguments(installPath, configPath, deployPath, getEndorsedDirectories(installPath), isTestEnv);
}
/**
@@ -171,4 +171,11 @@
public boolean supportsSeparateContextFiles() {
return false;
}
+
+ /**
+ * @see ITomcatVersionHandler#getEndorsedDirectories(IPath)
+ */
+ public String getEndorsedDirectories(IPath installPath) {
+ return installPath.append("common").append("endorsed").toOSString();
+ }
}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java
index 293e06c..c7984f0 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat50Handler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2007 IBM Corporation and others.
+ * Copyright (c) 2003, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -85,7 +85,7 @@
* @see ITomcatVersionHandler#getRuntimeVMArguments(IPath, IPath, IPath, boolean)
*/
public String[] getRuntimeVMArguments(IPath installPath, IPath configPath, IPath deployPath, boolean isTestEnv) {
- return TomcatVersionHelper.getCatalinaVMArguments(installPath, configPath, deployPath, isTestEnv);
+ return TomcatVersionHelper.getCatalinaVMArguments(installPath, configPath, deployPath, getEndorsedDirectories(installPath), isTestEnv);
}
/**
@@ -184,4 +184,11 @@
public boolean supportsSeparateContextFiles() {
return true;
}
+
+ /**
+ * @see ITomcatVersionHandler#getEndorsedDirectories(IPath)
+ */
+ public String getEndorsedDirectories(IPath installPath) {
+ return installPath.append("common").append("endorsed").toOSString();
+ }
}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat60Handler.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat60Handler.java
index 640d106..f8c14c7 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat60Handler.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/Tomcat60Handler.java
@@ -1,5 +1,5 @@
/**********************************************************************
- * Copyright (c) 2007 IBM Corporation and others.
+ * Copyright (c) 2007, 2008 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -79,7 +79,7 @@
* @see ITomcatVersionHandler#getRuntimeVMArguments(IPath, IPath, IPath, boolean)
*/
public String[] getRuntimeVMArguments(IPath installPath, IPath configPath, IPath deployPath, boolean isTestEnv) {
- return TomcatVersionHelper.getCatalinaVMArguments(installPath, configPath, deployPath, isTestEnv);
+ return TomcatVersionHelper.getCatalinaVMArguments(installPath, configPath, deployPath, getEndorsedDirectories(installPath), isTestEnv);
}
/**
@@ -178,4 +178,11 @@
public boolean supportsSeparateContextFiles() {
return true;
}
+
+ /**
+ * @see ITomcatVersionHandler#getEndorsedDirectories(IPath)
+ */
+ public String getEndorsedDirectories(IPath installPath) {
+ return installPath.append("endorsed").toOSString();
+ }
}
diff --git a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatVersionHelper.java b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatVersionHelper.java
index 0e9e96e..97cdd78 100644
--- a/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatVersionHelper.java
+++ b/plugins/org.eclipse.jst.server.tomcat.core/tomcatcore/org/eclipse/jst/server/tomcat/core/internal/TomcatVersionHelper.java
@@ -157,7 +157,7 @@
* @param isTestEnv test environment flag
* @return array of strings containing VM arguments
*/
- public static String[] getCatalinaVMArguments(IPath installPath, IPath instancePath, IPath deployPath, boolean isTestEnv) {
+ public static String[] getCatalinaVMArguments(IPath installPath, IPath instancePath, IPath deployPath, String endorsedDirs, boolean isTestEnv) {
List list = new ArrayList();
if (isTestEnv)
list.add("-Dcatalina.base=\"" + instancePath.toOSString() + "\"");
@@ -166,7 +166,7 @@
list.add("-Dcatalina.home=\"" + installPath.toOSString() + "\"");
// Include a system property for the configurable deploy location
list.add("-Dwtp.deploy=\"" + deployPath.toOSString() + "\"");
- list.add("-Djava.endorsed.dirs=\"" + installPath.append("common").append("endorsed").toOSString() + "\"");
+ list.add("-Djava.endorsed.dirs=\"" + endorsedDirs + "\"");
String[] s = new String[list.size()];
list.toArray(s);