« Return to Thread: Issues with Maven 2, Cargo and Jetty
I solved my JSP issues with Jetty by adding this dependency:Jan Bartel wrote:Jetty in cargo at the moment is an embedded container, that is, the
jetty classes have to be on the classpath at runtime. So, you can't
use the installer to install a version of jetty and then invoke a
container on it.
See http://cargo.codehaus.org/Jetty+6.x for hints.
As for the jetty jars, I recommend using 6.1.0rc2 (freshly baked!).
You'll need to put these jars as a minimum onto your runtime classpath:
jetty.jar
jetty-util.jar
servlet-api-2.5.jar
then if you want to use jsps, you've got a choice of jsp-2.0 or
jsp-2.1. Use the former if you're using <jdk1.5, use the latter
if you're on jdk1.5 or above (I highly recommend jsp-2.1 if possible).
If using jsp-2.0, that uses commons logging, so you'll also need to
add some kind of commons logging impl. With the jetty distro, we
use the slf4j logging system to bridge to commons logging, to
overcome the horrendous classloading issues associated with
commons logging discovery mechanism. So, you can use the
jcl104-over-slf4j.jar to bridge commons logging to slf4j
and then use the slf4j-simple.jar as the actual log. Note
that the slf4j-simple will only output INFO level and above
messages, but you can use any of the other slf4j impls as you
like instead (eg an slf4j impl for log4j). See www.slf4j.org
for more info.
jsp-2.0 jars:
ant-1.6.5.jar
commons-el-1.0.jar
jasper-compiler-5.5.15.jar
jasper-compiler-jdt-5.5.15.jar
jasper-runtime-5.5.15.jar
jsp-api-2.0.jar
jcl104-over-slf4j.jar and slf4j-simple.jar (optionals)
for jsp-2.1 jars:
ant-1.6.5.jar
core-3.1.1.jar
jsp-api-2.1.jar
jsp-2.1.jar
mraible wrote:Now I'm getting a new error - does the Jetty embedded container need additional dependencies defined?
javax.servlet.UnavailableException: Could not instantiate class org.apache.jasper.servlet.JspServlet
at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:402)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:878)
at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:350)
« Return to Thread: Issues with Maven 2, Cargo and Jetty
| Free embeddable forum powered by Nabble | Forum Help |