What jetty jar should I use?

Ben McCann picture Ben McCann · Dec 8, 2009 · Viewed 16.6k times · Source

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?

Answer

user336590 picture user336590 · Jun 20, 2010

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