6

Embedding Jetty webserver into a Java application is supposedly easy; examples abound.

No examples indicate the Jetty libraries that must be imported.

I have downloaded the Jetty distribution package... it has 36 jar files.

Where can I find a step-by-step example of exactly must be accomplished to embed Jetty in an application?

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
corgrath
  • 11,673
  • 15
  • 68
  • 99

2 Answers2

7

From the docs, libraries for embedding Jetty 6:

servlet-api-2.5-6.x.jar
jetty-util-6.x.jar
jetty-6.x.jar

For JSP you'll need additional jars.

For Jetty 8, try:

jetty-continuation-8.*.jar
jetty-http-8.*.jar
jetty-io-8.*.jar
jetty-server-8.*.jar
jetty-util-8.*.jar
servlet-api-3.0.jar

See also: http://wiki.eclipse.org/Jetty/Tutorial/Jetty_HelloWorld

Dave Jarvis
  • 30,436
  • 41
  • 178
  • 315
Peter Knego
  • 79,991
  • 11
  • 123
  • 154
  • Will these files be enough to do an HTTP Request from another android device over the same local network using HTTP VERBS like "GET/POST/PUT etc"? – KhanZeeshan Sep 17 '11 at 15:37
1

I was able to do this if anyone else wants to know follow the link.

http://codersapprentice.blogspot.com/2011/09/android-integrate-jetty-server-in-my.html

KhanZeeshan
  • 1,410
  • 5
  • 23
  • 36