14

Launching jetty by calling the API in 6.1.24.

The JSP 2.1 component is on the classpath.

org.mortbay.jetty:jsp-2.1-jetty:jar:6.1.24:compile

But the log says:

2010-08-19 08:16:19.443:INFO::NO JSP Support for /basis_ws, did not find org.apache.jasper.servlet.JspServlet

I don't see this message when using the corresponding maven-jetty-plugin.

What am I missing?

3 Answers 3

21

I got this problem when I first started with jetty. The problem is that just including the jsp jars doesn't seem to be enough. Here's the maven dependency list that I used to solve it.

    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-server</artifactId>
        <version>7.2.2.v20101205</version>
    </dependency>
    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-webapp</artifactId>
        <version>7.2.2.v20101205</version>
    </dependency>

    <dependency>
        <groupId>org.eclipse.jetty</groupId>
        <artifactId>jetty-jsp-2.1</artifactId>
        <version>7.2.2.v20101205</version>
    </dependency>
    <dependency>
        <groupId>org.mortbay.jetty</groupId>
        <artifactId>jsp-2.1-glassfish</artifactId>
        <version>2.1.v20100127</version>
    </dependency>
3
  • 7
    But what if I don't need JSP?
    – Karussell
    Mar 20, 2014 at 10:25
  • @Karussell in that case you just dont do anything that is a answer on how to enable JSP support in Jetty? That would sound like a plan to me...
    – JBA
    Mar 11, 2015 at 10:07
  • 2
    @JBA you have not understood the problem. I do not need JSP but I still have this confusing log message
    – Karussell
    Mar 11, 2015 at 14:04
12

I don't do Jetty, so I looked a bit round and found this blog. Here's a cite of relevance:

But, this is not enough, if you start the server you get an error like this:

INFO::NO JSP Support for /, did not find org.apache.jasper.servlet.JspServlet

So you have to enable jsp support in jetty passing additional undocumented options to the jetty start script:

$ java -jar jetty.jar OPTIONS=Server,jsp
2
  • Thanks for looking, but the mapping of that to the embedded environment is not obvious. The 'start script' isn't involved at all. However, this is a clue I can follow into the source.
    – bmargulies
    Aug 19, 2010 at 16:29
  • this is right, it's just thay nowaday one should write something like --module=server,jmx,resources,websocket,ext,plus,jsp,annotations jsp-impl=apache instead of OPTIONS - stackoverflow.com/questions/24524527/…
    – shabunc
    Mar 10, 2015 at 22:26
0

In case you're using Jetty 6 under Ubuntu, you may be hitting the problem I described here: https://serverfault.com/a/730626/293452

Briefly, a bug in the Jetty 6.x package dependencies will prevent Jetty from enabling JSP support because of incorrectly linked Tomcat Jasper libraries.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.