简体   繁体   中英

Missing Jetty files

I am currently making an app using Jetty. I think I am coming along nicely, but I am seeming to be missing a lot of libraries. I have tried AbstractHandler , Connector , and even just Handler . I used 3 commands to download my current libraries.

JETTY_VERSION=7.0.2.v20100331
wget -U none http://repo1.maven.org/maven2/org/eclipse/jetty/aggregate/jetty-all/$JETTY_VERSION/jetty-all-$JETTY_VERSION.jar
wget -U none http://repo1.maven.org/maven2/javax/servlet/servlet-api/2.5/servlet-api-2.5.jar

I might be using the Jetty 9 though.

Jetty 7.0.2 is extremely old and very outdated.

Jetty 7 (and Jetty 8) are now EOL (End of Life) . Don't use them.

Don't use jetty-all , its not meant for integrating with your application, its a tool purely designed for experimenting with jetty from a command line. Something that is only used as a demonstration of embedded jetty in the documentation.

If you are integrating into your application, starting with Jetty 7, you should be grabbing the individual component jars and using them.

Why isn't jetty-all enough you say? Well, the whole concept of jetty-all is misleading, it cannot have all of jetty, as that would produce a jar that cannot be used. There are many components and modules for jetty, nearly 90% of them are optional, and there are many alternative implementations for core components depending on what you want to do. (there are multiple jsp implementations, 2 different protocol negotiation modules, jvm specific boot classpath jars, etc...)

Lastly, don't use wget against the central maven repository system. your risk getting your IP banned if you do it enough. Even the effort to hide the wget user-agent with -U none isn't sufficient.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM