[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [jetty-users] Problems precompiling with Jasper2 in Jetty8
|
The use of taglibs under Servlet 3.0 requires that the taglib support implementation classes are obtained through a server classloader.
It started with the JSTL 1.2 standard, these taglibs cannot be in the webapp classpath, only the server classpath/classloader.
Jasper Compiler even enforces this requirement.
Jetty itself also enforces this requirement by filtering webapp included versions.
With ant you cannot satisfy this requirement.
That being said, you can have precompiled JSP's, but with maven instead.
Here's the same index.jsp, with a web.xml suited for servlet spec 3.0, and using the jetty 8.1.7 version of the jetty-jspc-maven-plugin.
JSP precompile will work via jetty-jspc-maven-plugin as our plugin creates the appropriate server classloader tree for the jasper JSPC to work with.
If you have no servlet-3.0 requirement, stick with the Jetty 7.x series, as that supports servlet 2.5.
If you have a servlet 3.0 requirement, then consider upgrading your build infrastructure to maven.
If you cannot upgrade to maven, and are stuck with ant, then you lose the ability to do JSP precompile if you also use taglibs (especially the standard JSTL and even the JSF taglibs).
Know that jetty 7.x and 8.x are released in parallel, from essentially the same codebase, with the only difference being the servlet spec support.
Jetty 7.x = Servlet 2.5
Jetty 8.x = Servlet 3.0
Note: Jetty 7.6.8 and Jetty 8.1.8 were released November 8th.
And for future reference ...
Jetty 9.x (currently in milestones) = Servlet 3.1 (spec still in early alpha)
--
Developer advice, services and support
from the Jetty & CometD experts
Attachment:
jsp-with-taglib-and-maven-jspc.tar.gz
Description: GNU Zip compressed data