tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Patrick Luby <patrick.l...@sun.com>
Subject Re: cvs commit: jakarta-tomcat-4.0/jasper/src/bin jasper.bat jasper.sh
Date Mon, 01 Apr 2002 17:34:11 GMT
Costin,

The problem with the default JVM behavior can cause your application to 
crash or behave in unexpected ways if there are incompatible jars 
installed in the jre/lib/ext directory.

The method that we are using is still compliant with the JDK 
documentation in that we are using the documented way over overriding 
the extensions via setting the "java.ext.dirs" property at startup. This 
also the same type of override mechanism for the endorsed directories in 
JDK 1.4.

The only feature we are adding is the ability to add your extensions 
back at the end of the classloader's search list.

I am definitely not in favor of just letting the jre/lib/ext directory 
sit at the front of the classloader's search list as that makes Tomcat 
very sensitive (read breakable) due to the user's JVM configuration. 
Hence, I believe that the "java.ext.dirs=" property setting should 
remain. As to whether we should try to add back the extensions at the 
end of the classloader's search list, I am not too picky about.

My first concern is that Tomcat always can at least run no matter what 
extensions that user has installed. Whether or not those extensions are 
accessible to Tomcat is, IMHO, a feature that we may or may not want to 
include.

Thanks,

Patrick

costinm@covalent.net wrote:

> I would be -1 on this - the JDK documentation clearly defines the 
> intended behavior of the ext directory, and this would create confusion
> and unpredictible behavior. I expect a file in ext/ to be included 
> _before_ tomcat classes - the way java documents it.  
> 
> ( I don't use ext/, but classloader changes do _allways_ create problems )
> 
> 
> Costin
> 
> 
> On 1 Apr 2002 patrickl@apache.org wrote:
> 
> 
>>patrickl    02/03/31 16:13:23
>>
>>  Modified:    catalina/src/bin catalina.bat catalina.sh setclasspath.bat
>>                        setclasspath.sh tool-wrapper.bat tool-wrapper.sh
>>               catalina/src/share/org/apache/catalina/startup
>>                        Bootstrap.java Tool.java
>>               jasper/src/bin jasper.bat jasper.sh
>>  Log:
>>  Put jar files installed in the JDK's jre/lib/ext directory after the jar files and
classes bundled with Tomcat. This is done by setting the "java.ext.dirs" property to a zero
length string and by put the JDK's jre/lib/ext directory in Tomcat's class loader. This also
fixes the problem that used to happen when you had the JSSE jars installed as a system extension
and you had JSSE_HOME set.
>>  
>>  Revision  Changes    Path
>>  1.28      +9 -9      jakarta-tomcat-4.0/catalina/src/bin/catalina.bat
>>  
>>  Index: catalina.bat
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.bat,v
>>  retrieving revision 1.27
>>  retrieving revision 1.28
>>  diff -u -r1.27 -r1.28
>>  --- catalina.bat	19 Mar 2002 18:10:56 -0000	1.27
>>  +++ catalina.bat	1 Apr 2002 00:13:23 -0000	1.28
>>  @@ -28,12 +28,12 @@
>>   rem                   system class path used to start Tomcat.
>>   rem
>>   rem   JPDA_TRANSPORT  (Optional) JPDA transport used when the "jpda start"
>>  -rem                   command is executed. The default is "dt_shmem".
>>  +rem                   command is executed. The default is "dt_socket".
>>   rem
>>   rem   JPDA_ADDRESS    (Optional) Java runtime options used when the "jpda start"
>>  -rem                   command is executed. The default is "jdbconn".
>>  +rem                   command is executed. The default is "8000".
>>   rem
>>  -rem $Id: catalina.bat,v 1.27 2002/03/19 18:10:56 patrickl Exp $
>>  +rem $Id: catalina.bat,v 1.28 2002/04/01 00:13:23 patrickl Exp $
>>   rem ---------------------------------------------------------------------------
>>   
>>   rem Guess CATALINA_HOME if not defined
>>  @@ -91,10 +91,10 @@
>>   if not ""%1"" == ""jpda"" goto noJpda
>>   set JPDA=jpda
>>   if not "%JPDA_TRANSPORT%" == "" goto gotJpdaTransport
>>  -set JPDA_TRANSPORT=dt_shmem
>>  +set JPDA_TRANSPORT=dt_socket
>>   :gotJpdaTransport
>>   if not "%JPDA_ADDRESS%" == "" goto gotJpdaAddress
>>  -set JPDA_ADDRESS=jdbconn
>>  +set JPDA_ADDRESS=8000
>>   :gotJpdaAddress
>>   shift
>>   :noJpda
>>  @@ -173,17 +173,17 @@
>>   rem Execute Java with the applicable properties
>>   if not "%JPDA%" == "" goto doJpda
>>   if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
>>  -%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
-classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
>>  +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
-Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%"
-Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS%
%ACTION%
>>   goto end
>>   :doSecurity
>>  -%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
-classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%"
%MAINCLASS% %CMD_LINE_ARGS% %ACTION%
>>  +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
-Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%"
%MAINCLASS% %CMD_LINE_ARGS% %ACTION%
>>   goto end
>>   :doJpda
>>   if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
>>  -%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%"
-Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS%
%ACTION%
>>  +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xdebug -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -Djava.ext.dirs="%JAVA_EXT_DIRS%"
-classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
>>   goto end
>>   :doSecurityJpda
>>  -%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager
-Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
-Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
>>  +%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% -Xrunjdwp:transport=%JPDA_TRANSPORT%,address=%JPDA_ADDRESS%,server=y,suspend=n
%DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -Djava.ext.dirs="%JAVA_EXT_DIRS%"
-classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
-Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%"
%MAINCLASS% %CMD_LINE_ARGS% %ACTION%
>>   goto end
>>   
>>   :end
>>  
>>  
>>  
>>  1.29      +17 -9     jakarta-tomcat-4.0/catalina/src/bin/catalina.sh
>>  
>>  Index: catalina.sh
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/catalina.sh,v
>>  retrieving revision 1.28
>>  retrieving revision 1.29
>>  diff -u -r1.28 -r1.29
>>  --- catalina.sh	19 Mar 2002 18:21:14 -0000	1.28
>>  +++ catalina.sh	1 Apr 2002 00:13:23 -0000	1.29
>>  @@ -32,7 +32,7 @@
>>   #                   (JSSE) installation, whose JAR files will be added to the
>>   #                   system class path used to start Tomcat.
>>   #
>>  -# $Id: catalina.sh,v 1.28 2002/03/19 18:21:14 patrickl Exp $
>>  +# $Id: catalina.sh,v 1.29 2002/04/01 00:13:23 patrickl Exp $
>>   # -----------------------------------------------------------------------------
>>   
>>   # OS specific support.  $var _must_ be set to either true or false.
>>  @@ -130,7 +130,8 @@
>>       echo "Using Security Manager"
>>       shift
>>       exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
>>  -      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +      -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>         -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-4.0/catalina/src/share
\
>>         -Djava.security.manager \
>>         -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
>>  @@ -140,7 +141,8 @@
>>         org.apache.catalina.startup.Bootstrap "$@" start
>>     else
>>       exec "$_RUNJDB" $JAVA_OPTS $CATALINA_OPTS \
>>  -      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +      -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>         -sourcepath "$CATALINA_HOME"/../../jakarta-tomcat-4.0/catalina/src/share
\
>>         -Dcatalina.base="$CATALINA_BASE" \
>>         -Dcatalina.home="$CATALINA_HOME" \
>>  @@ -153,7 +155,8 @@
>>     shift
>>     echo "Embedded Classpath: $CLASSPATH"
>>     exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
>>  -    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +    -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>       -Dcatalina.base="$CATALINA_BASE" \
>>       -Dcatalina.home="$CATALINA_HOME" \
>>       -Djava.io.tmpdir="$CATALINA_TMPDIR" \
>>  @@ -166,7 +169,8 @@
>>       echo "Using Security Manager"
>>       shift
>>       exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
>>  -      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +      -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>         -Djava.security.manager \
>>         -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
>>         -Dcatalina.base="$CATALINA_BASE" \
>>  @@ -175,7 +179,8 @@
>>         org.apache.catalina.startup.Bootstrap "$@" start
>>     else
>>       exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
>>  -      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +      -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>         -Dcatalina.base="$CATALINA_BASE" \
>>         -Dcatalina.home="$CATALINA_HOME" \
>>         -Djava.io.tmpdir="$CATALINA_TMPDIR" \
>>  @@ -190,7 +195,8 @@
>>       echo "Using Security Manager"
>>       shift
>>       "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
>>  -      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +      -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>         -Djava.security.manager \
>>         -Djava.security.policy=="$CATALINA_BASE"/conf/catalina.policy \
>>         -Dcatalina.base="$CATALINA_BASE" \
>>  @@ -200,7 +206,8 @@
>>         >> "$CATALINA_BASE"/logs/catalina.out 2>&1 &
>>     else
>>       "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
>>  -      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +      -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +      -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>         -Dcatalina.base="$CATALINA_BASE" \
>>         -Dcatalina.home="$CATALINA_HOME" \
>>         -Djava.io.tmpdir="$CATALINA_TMPDIR" \
>>  @@ -212,7 +219,8 @@
>>   
>>     shift
>>     exec "$_RUNJAVA" $JAVA_OPTS $CATALINA_OPTS \
>>  -    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +    -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>       -Dcatalina.base="$CATALINA_BASE" \
>>       -Dcatalina.home="$CATALINA_HOME" \
>>       -Djava.io.tmpdir="$CATALINA_TMPDIR" \
>>  
>>  
>>  
>>  1.6       +5 -2      jakarta-tomcat-4.0/catalina/src/bin/setclasspath.bat
>>  
>>  Index: setclasspath.bat
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/setclasspath.bat,v
>>  retrieving revision 1.5
>>  retrieving revision 1.6
>>  diff -u -r1.5 -r1.6
>>  --- setclasspath.bat	30 Mar 2002 23:50:43 -0000	1.5
>>  +++ setclasspath.bat	1 Apr 2002 00:13:23 -0000	1.6
>>  @@ -1,7 +1,7 @@
>>   rem ---------------------------------------------------------------------------
>>   rem Set CLASSPATH and Java options
>>   rem
>>  -rem $Id: setclasspath.bat,v 1.5 2002/03/30 23:50:43 patrickl Exp $
>>  +rem $Id: setclasspath.bat,v 1.6 2002/04/01 00:13:23 patrickl Exp $
>>   rem ---------------------------------------------------------------------------
>>   
>>   rem Make sure prerequisite environment variables are set
>>  @@ -33,7 +33,10 @@
>>   :okBasedir
>>   
>>   rem Set the default -Djava.endorsed.dirs argument
>>  -set JAVA_ENDORSED_DIRS=%BASEDIR%\bin;%BASEDIR%\common\endorsed
>>  +set JAVA_ENDORSED_DIRS=%BASEDIR%\common\endorsed
>>  +
>>  +rem Set the default -Djava.ext.dirs argument
>>  +set JAVA_EXT_DIRS=
>>   
>>   rem Set standard CLASSPATH
>>   rem Note that there are no quotes as we do not want to introduce random
>>  
>>  
>>  
>>  1.6       +5 -2      jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh
>>  
>>  Index: setclasspath.sh
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/setclasspath.sh,v
>>  retrieving revision 1.5
>>  retrieving revision 1.6
>>  diff -u -r1.5 -r1.6
>>  --- setclasspath.sh	30 Mar 2002 23:50:43 -0000	1.5
>>  +++ setclasspath.sh	1 Apr 2002 00:13:23 -0000	1.6
>>  @@ -1,7 +1,7 @@
>>   # -----------------------------------------------------------------------------
>>   #  Set CLASSPATH and Java options
>>   #
>>  -#  $Id: setclasspath.sh,v 1.5 2002/03/30 23:50:43 patrickl Exp $
>>  +#  $Id: setclasspath.sh,v 1.6 2002/04/01 00:13:23 patrickl Exp $
>>   # -----------------------------------------------------------------------------
>>   
>>   # Make sure prerequisite environment variables are set
>>  @@ -27,7 +27,10 @@
>>   fi
>>   
>>   # Set the default -Djava.endorsed.dirs argument
>>  -JAVA_ENDORSED_DIRS="$BASEDIR"/bin:"$BASEDIR"/common/endorsed
>>  +JAVA_ENDORSED_DIRS="$BASEDIR"/common/endorsed
>>  +
>>  +# Set the default -Djava.ext.dirs argument
>>  +JAVA_EXT_DIRS=
>>   
>>   # Set standard CLASSPATH
>>   CLASSPATH="$JAVA_HOME"/lib/tools.jar
>>  
>>  
>>  
>>  1.4       +2 -2      jakarta-tomcat-4.0/catalina/src/bin/tool-wrapper.bat
>>  
>>  Index: tool-wrapper.bat
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/tool-wrapper.bat,v
>>  retrieving revision 1.3
>>  retrieving revision 1.4
>>  diff -u -r1.3 -r1.4
>>  --- tool-wrapper.bat	15 Jan 2002 02:55:38 -0000	1.3
>>  +++ tool-wrapper.bat	1 Apr 2002 00:13:23 -0000	1.4
>>  @@ -15,7 +15,7 @@
>>   rem   JAVA_OPTS     (Optional) Java runtime options used when the "start",
>>   rem                 "stop", or "run" command is executed.
>>   rem
>>  -rem $Id: tool-wrapper.bat,v 1.3 2002/01/15 02:55:38 patrickl Exp $
>>  +rem $Id: tool-wrapper.bat,v 1.4 2002/04/01 00:13:23 patrickl Exp $
>>   rem ---------------------------------------------------------------------------
>>   
>>   rem Guess CATALINA_HOME if not defined
>>  @@ -54,6 +54,6 @@
>>   goto setArgs
>>   :doneSetArgs
>>   
>>  -%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
-classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%" org.apache.catalina.startup.Tool
%CMD_LINE_ARGS%
>>  +%_RUNJAVA% %JAVA_OPTS% %TOOL_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
-Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.home="%CATALINA_HOME%"
org.apache.catalina.startup.Tool %CMD_LINE_ARGS%
>>   
>>   :end
>>  
>>  
>>  
>>  1.5       +3 -3      jakarta-tomcat-4.0/catalina/src/bin/tool-wrapper.sh
>>  
>>  Index: tool-wrapper.sh
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/bin/tool-wrapper.sh,v
>>  retrieving revision 1.4
>>  retrieving revision 1.5
>>  diff -u -r1.4 -r1.5
>>  --- tool-wrapper.sh	15 Jan 2002 02:55:38 -0000	1.4
>>  +++ tool-wrapper.sh	1 Apr 2002 00:13:23 -0000	1.5
>>  @@ -14,7 +14,7 @@
>>   #   JAVA_OPTS     (Optional) Java runtime options used when the "start",
>>   #                 "stop", or "run" command is executed.
>>   #
>>  -# $Id: tool-wrapper.sh,v 1.4 2002/01/15 02:55:38 patrickl Exp $
>>  +# $Id: tool-wrapper.sh,v 1.5 2002/04/01 00:13:23 patrickl Exp $
>>   # -----------------------------------------------------------------------------
>>   
>>   # OS specific support.  $var _must_ be set to either true or false.
>>  @@ -73,6 +73,6 @@
>>   # ----- Execute The Requested Command -----------------------------------------
>>   
>>   exec "$_RUNJAVA" $JAVA_OPTS $TOOL_OPTS \
>>  -  -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  -  -Dcatalina.home="$CATALINA_HOME" \
>>  +  -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -Djava.ext.dirs="$JAVA_EXT_DIRS" \
>>  +  -classpath "$CLASSPATH" -Dcatalina.home="$CATALINA_HOME" \
>>     org.apache.catalina.startup.Tool "$@"
>>  
>>  
>>  
>>  1.35      +22 -5     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java
>>  
>>  Index: Bootstrap.java
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
>>  retrieving revision 1.34
>>  retrieving revision 1.35
>>  diff -u -r1.34 -r1.35
>>  --- Bootstrap.java	13 Feb 2002 20:01:37 -0000	1.34
>>  +++ Bootstrap.java	1 Apr 2002 00:13:23 -0000	1.35
>>  @@ -1,7 +1,7 @@
>>   /*
>>  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
1.34 2002/02/13 20:01:37 craigmcc Exp $
>>  - * $Revision: 1.34 $
>>  - * $Date: 2002/02/13 20:01:37 $
>>  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Bootstrap.java,v
1.35 2002/04/01 00:13:23 patrickl Exp $
>>  + * $Revision: 1.35 $
>>  + * $Date: 2002/04/01 00:13:23 $
>>    *
>>    * ====================================================================
>>    *
>>  @@ -85,7 +85,7 @@
>>    * class path and therefore not visible to application level classes.
>>    *
>>    * @author Craig R. McClanahan
>>  - * @version $Revision: 1.34 $ $Date: 2002/02/13 20:01:37 $
>>  + * @version $Revision: 1.35 $ $Date: 2002/04/01 00:13:23 $
>>    */
>>   
>>   public final class Bootstrap {
>>  @@ -121,6 +121,7 @@
>>               System.setProperty("catalina.base", getCatalinaHome());
>>   
>>           // Construct the class loaders we will need
>>  +        ClassLoader extLoader = null;
>>           ClassLoader commonLoader = null;
>>           ClassLoader catalinaLoader = null;
>>           ClassLoader sharedLoader = null;
>>  @@ -131,6 +132,14 @@
>>               File packed2[] = new File[2];
>>               ClassLoaderFactory.setDebug(debug);
>>   
>>  +            // Put the JDK's installed extensions in the parent class loader.
>>  +            // Presumably, the "java.ext.dirs" property has already been set
>>  +            // to a zero length string.
>>  +            packed[0] = new File(System.getProperty("java.home"),
>>  +                                 "lib" + File.separator + "ext");
>>  +            extLoader =
>>  +                ClassLoaderFactory.createClassLoader(null, packed, null);
>>  +
>>               unpacked[0] = new File(getCatalinaHome(),
>>                                      "common" + File.separator + "classes");
>>               packed2[0] = new File(getCatalinaHome(),
>>  @@ -138,7 +147,14 @@
>>               packed2[1] = new File(getCatalinaHome(),
>>                                     "common" + File.separator + "lib");
>>               commonLoader =
>>  -                ClassLoaderFactory.createClassLoader(unpacked, packed2, null);
>>  +                ClassLoaderFactory.createClassLoader(unpacked, packed2,
>>  +                                                     extLoader);
>>  +
>>  +            // Need to have the commonLoader only delegate to the parent
>>  +            // class loader only after searching its own repositories. This
>>  +            // allows the commonLoader's repositories to take priority over
>>  +            // the JDK's installed extensions.
>>  +            ((StandardClassLoader)commonLoader).setDelegate(false);
>>   
>>               unpacked[0] = new File(getCatalinaHome(),
>>                                      "server" + File.separator + "classes");
>>  @@ -155,6 +171,7 @@
>>               sharedLoader =
>>                   ClassLoaderFactory.createClassLoader(unpacked, packed,
>>                                                        commonLoader);
>>  +
>>           } catch (Throwable t) {
>>   
>>               log("Class loader creation threw exception", t);
>>  
>>  
>>  
>>  1.4       +18 -5     jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Tool.java
>>  
>>  Index: Tool.java
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Tool.java,v
>>  retrieving revision 1.3
>>  retrieving revision 1.4
>>  diff -u -r1.3 -r1.4
>>  --- Tool.java	18 Dec 2001 02:50:30 -0000	1.3
>>  +++ Tool.java	1 Apr 2002 00:13:23 -0000	1.4
>>  @@ -1,7 +1,7 @@
>>   /*
>>  - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Tool.java,v
1.3 2001/12/18 02:50:30 patrickl Exp $
>>  - * $Revision: 1.3 $
>>  - * $Date: 2001/12/18 02:50:30 $
>>  + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/startup/Tool.java,v
1.4 2002/04/01 00:13:23 patrickl Exp $
>>  + * $Revision: 1.4 $
>>  + * $Date: 2002/04/01 00:13:23 $
>>    *
>>    * ====================================================================
>>    *
>>  @@ -116,7 +116,7 @@
>>    * </ul>
>>    *
>>    * @author Craig R. McClanahan
>>  - * @version $Revision: 1.3 $ $Date: 2001/12/18 02:50:30 $
>>  + * @version $Revision: 1.4 $ $Date: 2002/04/01 00:13:23 $
>>    */
>>   
>>   public final class Tool {
>>  @@ -214,6 +214,14 @@
>>                   log("Constructing class loader");
>>                   ClassLoaderFactory.setDebug(1);
>>               }
>>  +            // Put the JDK's installed extensions in the parent class loader.
>>  +            // Presumably, the "java.ext.dirs" property has already been set
>>  +            // to a zero length string.
>>  +            File[] extFile = new File[1];
>>  +            extFile[0] = new File(System.getProperty("java.home"),
>>  +                                    "lib" + File.separator + "ext");
>>  +            ClassLoader extLoader =
>>  +                ClassLoaderFactory.createClassLoader(null, extFile, null);
>>               ArrayList packed = new ArrayList();
>>               ArrayList unpacked = new ArrayList();
>>               unpacked.add(new File(catalinaHome, "classes"));
>>  @@ -240,7 +248,12 @@
>>                   ClassLoaderFactory.createClassLoader
>>                   ((File[]) unpacked.toArray(new File[0]),
>>                    (File[]) packed.toArray(new File[0]),
>>  -                 null);
>>  +                 extLoader);
>>  +            // Need to have the classLoader only delegate to the parent
>>  +            // class loader only after searching its own repositories. This
>>  +            // allows the classLoader's repositories to take priority over
>>  +            // the JDK's installed extensions.
>>  +            ((StandardClassLoader)classLoader).setDelegate(false);
>>           } catch (Throwable t) {
>>               log("Class loader creation threw exception", t);
>>               System.exit(1);
>>  
>>  
>>  
>>  1.9       +3 -2      jakarta-tomcat-4.0/jasper/src/bin/jasper.bat
>>  
>>  Index: jasper.bat
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/bin/jasper.bat,v
>>  retrieving revision 1.8
>>  retrieving revision 1.9
>>  diff -u -r1.8 -r1.9
>>  --- jasper.bat	30 Jan 2002 22:13:50 -0000	1.8
>>  +++ jasper.bat	1 Apr 2002 00:13:23 -0000	1.9
>>  @@ -15,7 +15,7 @@
>>   rem   JAVA_OPTS     (Optional) Java runtime options used when the "start",
>>   rem                 "stop", or "run" command is executed.
>>   rem
>>  -rem $Id: jasper.bat,v 1.8 2002/01/30 22:13:50 patrickl Exp $
>>  +rem $Id: jasper.bat,v 1.9 2002/04/01 00:13:23 patrickl Exp $
>>   rem ---------------------------------------------------------------------------
>>   
>>   rem Guess JASPER_HOME if not defined
>>  @@ -46,6 +46,7 @@
>>   for %%i in ("%JASPER_HOME%\common\lib\*.jar") do call "%JASPER_HOME%\bin\cpappend.bat"
%%i
>>   for %%i in ("%JASPER_HOME%\shared\lib\*.jar") do call "%JASPER_HOME%\bin\cpappend.bat"
%%i
>>   set CLASSPATH=%CLASSPATH%;%JASPER_HOME%\shared\classes
>>  +for %%i in ("%JAVA_HOME%\jre\lib\ext\*.jar") do call "%JASPER_HOME%\bin\cpappend.bat"
%%i
>>   
>>   rem Parse arguments
>>   if ""%1"" == ""jspc"" goto doJspc
>>  @@ -65,6 +66,6 @@
>>   goto setArgs
>>   :doneSetArgs
>>   
>>  -%_RUNJAVA% %JAVA_OPTS% %JASPER_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
-classpath "%CLASSPATH%" -Djasper.home="%JASPER_HOME%" org.apache.jasper.JspC %CMD_LINE_ARGS%
>>  +%_RUNJAVA% %JAVA_OPTS% %JASPER_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%"
-Djava.ext.dirs="%JAVA_EXT_DIRS%" -classpath "%CLASSPATH%" -Djasper.home="%JASPER_HOME%" org.apache.jasper.JspC
%CMD_LINE_ARGS%
>>   
>>   :end
>>  
>>  
>>  
>>  1.9       +6 -2      jakarta-tomcat-4.0/jasper/src/bin/jasper.sh
>>  
>>  Index: jasper.sh
>>  ===================================================================
>>  RCS file: /home/cvs/jakarta-tomcat-4.0/jasper/src/bin/jasper.sh,v
>>  retrieving revision 1.8
>>  retrieving revision 1.9
>>  diff -u -r1.8 -r1.9
>>  --- jasper.sh	30 Jan 2002 22:13:50 -0000	1.8
>>  +++ jasper.sh	1 Apr 2002 00:13:23 -0000	1.9
>>  @@ -14,7 +14,7 @@
>>   #   JAVA_OPTS     (Optional) Java runtime options used when the "start",
>>   #                 "stop", or "run" command is executed.
>>   #
>>  -# $Id: jasper.sh,v 1.8 2002/01/30 22:13:50 patrickl Exp $
>>  +# $Id: jasper.sh,v 1.9 2002/04/01 00:13:23 patrickl Exp $
>>   # -----------------------------------------------------------------------------
>>   
>>   # OS specific support.  $var _must_ be set to either true or false.
>>  @@ -68,6 +68,9 @@
>>     CLASSPATH="$CLASSPATH":"$i"
>>   done
>>   CLASSPATH="$CLASSPATH":"$JASPER_HOME"/shared/classes
>>  +for i in "$JAVA_HOME"/jre/lib/ext/*.jar; do
>>  +  CLASSPATH="$CLASSPATH":"$i"
>>  +done
>>   
>>   # For Cygwin, switch paths to Windows format before running java
>>   if $cygwin; then
>>  @@ -82,7 +85,8 @@
>>   
>>     shift
>>     exec "$_RUNJAVA" $JAVA_OPTS $JASPER_OPTS \
>>  -    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
>>  +    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
>>  +    -Djava.ext.dirs="$JAVA_EXT_DIRS" -classpath "$CLASSPATH" \
>>       -Djasper.home="$JASPER_HOME" \
>>       org.apache.jasper.JspC "$@"
>>   
>>  
>>  
>>  
>>
>>--
>>To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
>>For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
>>
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>
> 


-- 
________________________________________________________________
Patrick Luby                     Email: patrick.luby@sun.com
Sun Microsystems                         Phone: 408-276-7471
901 San Antonio Road, USCA14-303
Palo Alto, CA 94303-4900
________________________________________________________________


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


Mime
View raw message