JSP 2.0 vs JSP 2.1
Jetty does not implement JSP directly. Instead it uses a servlet to provide this functionality required by the servle specification. As part of Java EE 5 (the next version of J2EE), the companion of 2.5 servlet specification is the 2.1 JSP specification.
While all Java EE 5 technologies formally depend on java 5 (jre 1.5), this is a soft dependency for servlets and Jetty 6 will compile and run on jre 1.4. However, for JSP the dependency of java 5 is a hard dependency and jre 1.5 must be used to run the server with JSP 2.1
Thus Jetty 6 supports both JSP 2.0 and JSP 2.1 so that jre 1.4 users may be supported. Jetty standalone does this at runtime via the start.jar mechanism, which determines which jre version is being used, and puts the appropriate JSP libs on the classpath. The maven jetty plugin also detects the runtime jre version and uses either JSP2.0 or JSP2.1 as appropriate.
If you are using jre 1.5, but specifically want to use JSP 2.0, you may do so by removing or renaming the JSP 2.1 directories in
$jetty.home/lib, which will force the use of JSP2.0. There are also instructions on how to do the same thing for the maven jetty plugin.
JSP 2.0 support is provided by two source modules in Jetty:
This is the standard API that has been imported from the apache project. Eventually this should be obtained from an external maven dependency. The jars produced from this module can be found in
This module imports apache jasper servlet as a jar, plus its dependencies. The jars produced from this module can be found in
JSP 2.1 support is provided by two source modules in Jetty:
This is the standard API from project glassfish. Eventually this should be obtained from an external maven dependency. The jars produced from this module are found in
This module uses jasper from project glassfish. The jars produced from this module are found in
Disabling JSP support
You can easily disable JSP support by simply making unavailable any JSP jars on the runtime classpath. Jetty detects the lack of JSP support and prints a warning message, but continues to run.