jetty, jsp 2.1 & maven
NO JSP Support for /
As of Jetty 7 the fast and small servlet container moved to the umbrella of the eclipse foundation. Due to stupid licensing issues not everything was moved. Jetty 7 ships without a jsp implementation. If jetty can't find a jsp implementation it prints out the following info message:
NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet
Thus if you want to use an embedded jetty in your maven project (e.g. for avoiding WTP for doing .war development) you can't use an official jetty 7 artifact but must use the glassfish jsp 2.1 implementation instead. See the following pom snippet for the complete list of necessary artifacts
Re: jetty, jsp 2.1 & maven
For me this combination doesn't work. Isn't it better to use:
<dependency> <groupId>org.mortbay.jetty</groupId>
<artifactId>jsp-api-2.1</artifactId> <version>7.0.0pre2</version> </dependency>
and
<dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>servlet-api-2.5</artifactId> <version>6.1.14</version> </dependency>
instead of javax.servlet and javax.servlet.jsp ? Regardless of the versions.
Then, there is no
<dependency> <groupId>org.mortbay.jetty</groupId> <artifactId>jsp-api-2.1-glassfish</artifactId> <version>9.1.1.B60.25.p2</version> </dependency>
And finally I'm getting: java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
with this setting, the jstl is a mess
Re: jetty, jsp 2.1 & maven
@Tom jsp-api-2.1-glassfishcan be found here:
http://mirrors.ibiblio.org/pub/mirrors/maven2/org/mortbay/jetty/jsp-2.1-glassfish/9.1.1.B60.25.p2/I' dont encounter that NoSuchMethodError, but maybe it depends on the type of EL you are using. For me a Stripes based application works find with this setup.