Embedding Jetty webserver in开发者_如何学Pythonto 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?
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
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
精彩评论