costin 01/01/24 21:07:40
Modified:.build.xml
src/etc server.xml tomcat.policy
src/facade22/org/apache/tomcat/facade
RequestDispatcherImpl.java
src/share/org/apache/tomcat/core BaseInterceptor.java
src/share/org/apache/tomcat/modules/config
LoaderInterceptor11.java PolicyInterceptor.java
ServerXmlInterceptor.java
src/share/org/apache/tomcat/modules/generators
Jdk12Interceptor.java
src/share/org/apache/tomcat/modules/session
SimpleSessionStore.java
Added: src/share/org/apache/tomcat/modules/config PolicyLoader.java
src/share/org/apache/tomcat/util/compat Action.java
Jdk11Compat.java Jdk12Support.java
Log:
Fixes and changes for JDK1.1 support.
The build on 1.1 was broken for few weeks, and I hope this solution
will improve the things a bit (in addition, I'll check the nightly 1.1
build until we're done ).
The util.compat package contains a helper that will avoid the use of
introspection or other (complex) solutions to maintain 1.1 compatibility.
It's just a small wrapper around common methods, with 2 implementations -
one for jdk1.1 ( doing nothing for doPriviledged, returning SimpleClassLoader,
etc) and one for jdk1.2+ ( wrapping and performing PriviledgedAction,
returning the URLClassLoader, etc).
As a result:
- LoaderInterceptor12 is no longer needed
- LoaderInterceptor11 will automatically use URLClassLoader if in Java2
environment, no need to edit server.xml for that
- Jdk12Interceptor compiles and can be loaded in jdk1.1. It'll do
java2 tasks if java2 is detected ( there is another trick to add it only
if needed - see next )
- and of course, it builds and work fine on JDK1.1 ( again )
As a related change, PolicyInterceptor will be automatically
loaded if Java2 is detected and a security manager is set (or a
secure option is set on the contextmanager ). To do that we use
PolicyLoader, that detect the conditions where we want sandboxing
and if java2 is available and loads the "real" policy interceptor.
That simplifies a lot the configuration, we no longer need to explain
how to change the config just to run JNDI in java2 environment.
I also added the permissions needed to run /admin in a sandbox, there
are few tests that are failing in sandbox - I'm working on a fix
( but probably next week, I have a deadline for monday )
Also, added a small comment ( to be expanded ) in BaseInterceptor.
Revision ChangesPath
1.106 +3 -1 jakarta-tomcat/build.xml
Index: build.xml
===
RCS file: /home/cvs/jakarta-tomcat/build.xml,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -r1.105 -r1.106
--- build.xml 2001/01/22 16:42:00 1.105
+++ build.xml 2001/01/25 05:07:32 1.106
@@ -107,6 +107,7 @@
!-- no dependencies --
include name="org/apache/tomcat/util/**"/
exclude name="**/util/net/SSLSocketFactory.java" unless="jsse.present"/
+ exclude name="**/util/compat/Jdk12Support.java" unless="jdk12.present"/
/javac
jar jarfile="${tomcat.build}/lib/tomcat_util.jar"
basedir="${tomcat.build}/classes"
@@ -238,9 +239,10 @@
pathelement location="${tomcat.build}/lib/tomcat_core.jar"/
/classpath
include name="org/apache/tomcat/modules/**"/
- exclude
+ !-- exclude
name="org/apache/tomcat/modules/generators/Jdk12Interceptor.java"
unless="jdk12.present"/
+ --
exclude
name="org/apache/tomcat/modules/config/LoaderInterceptor12.java"
unless="jdk12.present"/
1.60 +6 -3 jakarta-tomcat/src/etc/server.xml
Index: server.xml
===
RCS file: /home/cvs/jakarta-tomcat/src/etc/server.xml,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- server.xml2001/01/01 02:07:23 1.59
+++ server.xml2001/01/25 05:07:33 1.60
@@ -112,6 +112,9 @@
ContextInterceptor
className="org.apache.tomcat.facade.WebXmlReader" /
+ContextInterceptor
+className="org.apache.tomcat.modules.config.PolicyLoader" /
+
!-- Uncomment out if you have JDK1.2 and want to implement
the Java SecurityManager
ContextInterceptor
@@ -149,11 +152,11 @@
className="org.apache.tomcat.modules.mappers.SimpleMapper1"
debug="0" /
-!-- fix the context class loader, other JDK1.2 specific code
+!-- fix the context class loader, other JDK1.2 specific code --