views:

859

answers:

3

I'd like to create an application using the embedded version of Jetty. Unfortunately, I can't find any information on what jar files I would need to do that. There are several in the maven repository (http://repo2.maven.org/maven2/org/eclipse/jetty/aggregate/). But what's the difference between jetty-server, jetty-server-all, and jetty-webapp? Are any of these what I want for the embedded use case?

+1  A: 

This document lists the JAR files required for embedding and is pretty complete.

http://docs.codehaus.org/display/JETTY/Embedding+Jetty

I believe you won't need the Ant jar file unless you're invoking Jetty from Ant, even though it says you need it.

Some of the JSP jar files are named differently in the binary bundle than that document calls for, but this document helps figure out which Jetty JSP jars to use:

http://docs.codehaus.org/display/JETTY/JSP+2.0+v+JSP+2.1

Alan Krueger
A: 

I used jetty-webapp.

Ben McCann
A: 

I stopped getting compile errors against the Eclipse embedded code minimal example combining SimplestServer and HelloWorldHandler...

http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty

To achieve this I had to include the following from the lib directory in the unzipped distribution from eclipse's jetty mirror...

  • jetty-server-7.1.4xxxx.jar
  • jetty-util-7.1.4xxxx.jar
  • servlet-api.2.5.jar