What is an alternative to Jetty? I'm looking for a simple javax.servlet container. Jetty is too complex for the task I'm working with. And its documentation is very poor.
PS. I created my own web framework: takes.org
Tomcat is an Apache project, while Jetty is managed by the Eclipse Foundation. In terms of licensing, Tomcat enjoys the Apache 2.0 open source license, while Jetty is dual licensed through both the Apache 2.0 License and the Eclipse Public License 1.0.
Jetty provides a web server and servlet container, additionally providing support for HTTP/2, WebSocket, OSGi, JMX, JNDI, JAAS and many other integrations. These components are open source and are freely available for commercial use and distribution.
Jetty is an open source Java web server, as well as a servlet container, that provides an application with the features required to launch and run an application servlet or API.
Jetty is a pure Java-based HTTP (Web) server and Java Servlet container. While Web Servers are usually associated with serving documents to people, Jetty is now often used for machine to machine communications, usually within larger software frameworks.
Try Grizzly, which is the standalone part of Jersey (JAX-RS implementation).
That being said, except if you are really constrained, why wouldn't a minimalist config of Tomcat or even GlassFish work for you?
If complexity is an issue, then maybe you should start with Tomcat first and then see how Jetty (or others) could be used and how it would fit your goals later. Tomcat is not that heavyweight, and at least you'll have plenty of documentation and examples to look at.
Update: As you mention in the comment that you need JAX-RS support, Jersey is indeed a good option. Have a look at Vogella's article on REST with Java using Jersey for a good ramp-up.
Do you know about embedding jetty? This is instead of deploying your app in jetty, embedding jetty in your app.
I used before and it's quite easy. Here's some documentation:
http://wiki.eclipse.org/Jetty/Tutorial/Embedding_Jetty
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With