* Move from Servlet 2.4/JSP 2.0 to Servlet 2.5/JSP 2.1

- Replace Jasper 2.0 from Jetty 6 with Apache Tomcat 6.0.35 (CDDL 1.0 + GPLv2)
  - Replace JSTL 1.1.2 with JSTL 1.2 (CDDL 1.0 + GPLv2)
This commit is contained in:
zzz
2012-01-10 04:03:30 +00:00
parent 51f7f3a378
commit 3024b3fd3b
16 changed files with 101 additions and 16 deletions

View File

@ -216,8 +216,10 @@ Applications:
Copyright (C) 2005 <susi23@mail.i2p>
GPLv2 (or any later version)
See licenses/LICENSE-GPLv2.txt
Uses Apache Jakarta Standard Tag Library 1.1.2:
See licenses/LICENSE-Apache2.0.txt
Uses Glassfish Standard Tag Library (JSTL) 1.2:
Common Development and Distribution License (CDDL) version 1.0 + GNU General Public License (GPL) version 2
See https://glassfish.dev.java.net/public/CDDL+GPL.html
See licenses/LICENSE-GPLv2.txt
SusiMail:
Copyright (C) 2004-2005 <susi23@mail.i2p>
@ -229,6 +231,10 @@ Applications:
Bundles systray4j-2.4.1:
See licenses/LICENSE-LGPLv2.1.txt
Tomcat 6.0.35:
Copyright 1999-2011 The Apache Software Foundation
See licenses/LICENSE-Apache2.0.txt
See licenses/NOTICE-Tomcat.txt
Other Applications and Libraries

View File

@ -0,0 +1,16 @@
Apache Tomcat
Copyright 1999-2011 The Apache Software Foundation
This product includes software developed by
The Apache Software Foundation (http://www.apache.org/).
The Windows Installer is built with the Nullsoft
Scriptable Install Sysem (NSIS), which is
open source software. The original software and
related information is available at
http://nsis.sourceforge.net.
Java compilation software for JSP pages is provided by Eclipse,
which is open source software. The original software and
related information is available at
http://www.eclipse.org.

View File

@ -0,0 +1,14 @@
This is Apache Tomcat 6.x, supporting Servlet 2.5 and JSP 2.1.
The Glassfish JSP 2.1 bundled in Jetty 6 is way too old.
Retrieved from the file
apache-tomcat-6.0.35-deployer.tar.gz
minus the following files and directores:
build.xml
deployer-howto.html
images/*
lib/catalina*
LICENSE (see ../../../licenses/LICENSE-Apache2.0.txt, it's also inside every jar)
RELEASE-NOTES

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -8,6 +8,7 @@
<property name="jetty.url" value="http://dist.codehaus.org/jetty/${jetty.base}/${jetty.filename}" />
<property name="verified.filename" value="verified.txt" />
<property name="javac.compilerargs" value="" />
<property name="tomcat.lib" value="apache-tomcat-deployer/lib" />
<target name="all" depends="build" />
@ -82,28 +83,48 @@
jetty-util-xxx.jar: LifeCycle (base class for stuff), URIUtil (used in i2psnark)
jetty-sslengine-xxx.jar: SSL NIO Connector for console
jetty-java5-threadpool-xxx.jar: Concurrent thread pool for eepsite
jasper*, commons-logging.jar: JspC compiler, webapp runtime
glassfish 2.1: Not used, too old, see Tomcat below.
jetty-rewrite-handler: Not used by I2P, but only 20KB and could be useful for eepsites
All of these are available in the Ubuntu packages libjetty-java and libjetty-extra-java
-->
<copy preservelastmodified="true" file="${jetty.base}/start.jar" tofile="jettylib/jetty-start.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/${jetty.base}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
<copy file="${jetty.base}/lib/${jetty.base}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-java5-threadpool-${jetty.ver}.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-rewrite-handler-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-sslengine-${jetty.ver}.jar" tofile="jettylib/jetty-sslengine.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/ant-1.6.5.jar" tofile="jettylib/ant.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/commons-el-1.0.jar" tofile="jettylib/commons-el.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jasper-compiler-5.5.15.jar" tofile="jettylib/jasper-compiler.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jasper-runtime-5.5.15.jar" tofile="jettylib/jasper-runtime.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jsp-api-2.0.jar" tofile="jettylib/jsp-api.jar" />
<copy preservelastmodified="true" file="${jetty.base}/lib/servlet-api-2.5-20081211.jar" tofile="jettylib/javax.servlet.jar" />
<copy file="${jetty.base}/lib/jsp-2.1/ant-1.6.5.jar" tofile="jettylib/ant.jar" />
<delete file="jetty.tar" />
<delete dir="${jetty.base}" />
<!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over, we need it
for org.apache.jasper.JspC compiler
-->
<copy preservelastmodified="true" file="../../installer/lib/launch4j/lib/commons-logging.jar" todir="jettylib/" />
<ant target="copyTomcatLib" />
</target>
<!-- Tomcat.
The glassfish jars bundled in Jetty 6 are way too old.
For compatibility with very old I2P installations where the classpath
was set individually in wrapper.config, we rename and combine the jars as follows:
jasper.jar : jasper-runtime.jar
jasper-el.jar + el-api.jar : commons-el.jar
servlet-api.jar + jsp-api.jar : javax.servlet.jar
tomcat-juli.jar : commons-logging.jar
empty jar : jasper-compiler.jar
-->
<target name="copyTomcatLib" >
<copy file="${tomcat.lib}/jasper.jar" tofile="jettylib/jasper-runtime.jar" />
<copy file="${tomcat.lib}/jasper-el.jar" tofile="jettylib/commons-el.jar" />
<jar destfile="jettylib/commons-el.jar" duplicate="preserve" update="true" >
<zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/el-api.jar" />
</jar>
<copy file="${tomcat.lib}/servlet-api.jar" tofile="jettylib/javax.servlet.jar" />
<jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" update="true" >
<zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/jsp-api.jar" />
</jar>
<copy file="${tomcat.lib}/tomcat-juli.jar" tofile="jettylib/commons-logging.jar" />
<jar destfile="jettylib/jasper-compiler.jar" />
</target>
<target name="build" depends="jar" />

View File

@ -0,0 +1,12 @@
These are 1.2 libs downloaded from http://jstl.java.net/download.html
Licenses: Common Development and Distribution License (CDDL) version 1.0 + GNU General Public License (GPL) version 2
https://glassfish.dev.java.net/public/CDDL+GPL.html
1.2 libs are compatible with JSP 2.1 containers.
See http://www.coderanch.com/how-to/java/JstlTagLibDefinitions for more info.
The previous files were version 1.1.2 for JSP 2.0.
Old names kept so they are overwritten in the update and are in the classpath.
jstl-api-1.2.jar -> jstl.jar
jstl-impl-1.2.jar -> standard.jar

View File

@ -567,6 +567,15 @@
<defaultexcludes default="true"/>
</target>
<target name="webappDistclean">
<ant dir="apps/i2ptunnel/java/" target="distclean" />
<ant dir="apps/routerconsole/java/" target="distclean" />
<ant dir="apps/addressbook/" target="distclean" />
<ant dir="apps/susimail/" target="distclean" />
<ant dir="apps/susidns/src/" target="distclean" />
<ant dir="apps/i2psnark/java/" target="distclean" />
</target>
<target name="pkg" depends="distclean, updater, preppkg, installer" />
<target name="pkgclean" depends="deletepkg-temp">
@ -758,6 +767,7 @@
So we include the MIT one in our binary package
-->
<copy file="installer/lib/launch4j/head/LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Launch4j.txt" />
<copy file="apps/jetty/apache-tomcat-deployer/NOTICE" tofile="pkg-temp/licenses/NOTICE-Tomcat.txt" />
<!-- Not sure if these are used or should be included -->
<copy file="installer/lib/launch4j/lib/foxtrot.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-Foxtrot.txt" />
<copy file="installer/lib/launch4j/lib/JGoodies.Forms.LICENSE.txt" tofile="pkg-temp/licenses/LICENSE-JGoodies-Forms.txt" />
@ -947,7 +957,7 @@
-->
<target name="prepjupdate" depends="prepupdate, buildWEB">
<copy todir="pkg-temp/lib" >
<fileset dir="build" includes="jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.jetty.jar" />
<fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.jetty.jar" />
</copy>
<!-- We have to package the new eepsite files for MigrateJetty.java, but we
can't overwrite an existing eepsite dir in a non-split configuration.

View File

@ -1,3 +1,5 @@
# Files listed here will be deleted after the update is extracted
# expired cert
certificates/r31453.ovh.net
# old jetty 5 libs
lib/org.mortbay.jmx.jar

View File

@ -1348,11 +1348,13 @@ public class Router implements RouterClock.ClockShiftListener {
// and we will die with NCDFE.
// Ideally, do not use I2P classes at all, new or not.
try {
// TODO move deleteListedFiles() here after a few releases
if (ok)
if (ok) {
// We do this here so we may delete old jars before we restart
deleteListedFiles();
System.out.println("INFO: Update installed");
else
} else {
System.out.println("ERROR: Update failed!");
}
if (!ok) {
// we can't leave the file in place or we'll continually restart, so rename it
File bad = new File(_context.getRouterDir(), "BAD-" + UPDATE_FILE);
@ -1383,8 +1385,10 @@ public class Router implements RouterClock.ClockShiftListener {
System.exit(EXIT_HARD_RESTART);
} else {
deleteJbigiFiles();
// Here so it may be used in the 0.8.12 update
// TODO move up in a few releases so it is only run after an update
// It was here starting in 0.8.12 so it could be used the very first time
// Now moved up so it is usually run only after an update
// But the first time before jetty 6 it will run here...
// Here we can't remove jars
deleteListedFiles();
}
}