diff --git a/apps/jetty/apache-tomcat/README-i2p.txt b/apps/jetty/apache-tomcat/README-i2p.txt new file mode 100644 index 0000000000000000000000000000000000000000..edeb05fcbb56801513b143f703420dea31a7c6ec --- /dev/null +++ b/apps/jetty/apache-tomcat/README-i2p.txt @@ -0,0 +1,10 @@ +This is Apache Tomcat 6.x, supporting Servlet 2.5 and JSP 2.1. + +Retrieved from the file + apache-tomcat-6.0.41.tar.gz + +containing only a small subset of lib/tomcat-coyote.jar. + +See the buildTomcatUtilJar target in ../build.xml for the classes extracted and more information. + +LICENSE: see ../../../licenses/LICENSE-Apache2.0.txt diff --git a/apps/jetty/apache-tomcat/lib/tomcat-coyote-util.jar b/apps/jetty/apache-tomcat/lib/tomcat-coyote-util.jar new file mode 100644 index 0000000000000000000000000000000000000000..da3061a5f169e598b76226bf6d79f9f38ee6dbef Binary files /dev/null and b/apps/jetty/apache-tomcat/lib/tomcat-coyote-util.jar differ diff --git a/apps/jetty/build.xml b/apps/jetty/build.xml index ddb0fffbc3ad94e42c59fe1313d9aa17728c9d33..bb7de443d01ab0406a78aeb6458da964f0e89e4c 100644 --- a/apps/jetty/build.xml +++ b/apps/jetty/build.xml @@ -10,6 +10,9 @@ <property name="javac.compilerargs" value="" /> <property name="javac.version" value="1.6" /> <property name="tomcat.lib" value="apache-tomcat-deployer/lib" /> + <property name="tomcat.ver" value="6.0.41" /> + <property name="tomcat2.lib" value="apache-tomcat-${tomcat.ver}/lib" /> + <property name="tomcat2.lib.small" value="apache-tomcat/lib" /> <target name="all" depends="build" /> @@ -152,6 +155,23 @@ <ant target="copyTomcatLib" /> </target> + <!-- Tomcat util jar. + As of Tomcat 6.0.39, the deployer does not contain some classes that are required + to precompile jsps with tags (SusiDNS and i2p-bote). + These classes are in the main Tomcat package, in lib/tomcat-coyote.jar. + As the jar is 800 KB and we only need 12 KB of that, we extract the required classes + to a new jar, created and checked in using this target. + Apparently this is only required for precompilation of jsps, so this is put in + with the JspC compiler jasper-runtime.jar below. + --> + <target name="buildTomcatUtilJar" > + <!-- take only what we need from the tomcat-coyote jar --> + <jar destfile="${tomcat2.lib.small}/tomcat-coyote-util.jar" > + <zipfileset src="${tomcat2.lib}/tomcat-coyote.jar" + includes="org/apache/tomcat/util/descriptor/* org/apache/tomcat/util/res/*" /> + </jar> + </target> + <!-- Tomcat. The glassfish jars bundled in Jetty 6 are way too old. For compatibility with very old I2P installations where the classpath @@ -170,6 +190,7 @@ <target name="copyTomcatLib" > <jar destfile="jettylib/jasper-runtime.jar" filesetmanifest="merge" > <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper.jar" /> + <zipfileset src="${tomcat2.lib.small}/tomcat-coyote-util.jar" /> </jar> <jar destfile="jettylib/commons-el.jar" duplicate="preserve" filesetmanifest="merge" > <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper-el.jar" />