Jetty Java HTTP Servlet Server

Java HTTP Server & Servlet Container


Jetty is a 100% Java HTTP Server and Servlet Container. This means that you do not need to configure and run a seperate web server (like Apache) in order to use java, servlets and JSPs to generate dynamic content. Jetty is a fully featured web server for static and dynamic content.

Unlike separate server/container solutions, this means that your web server and web application run in the same process, without interconnection overheads and complications. Furthermore, as a pure java component, Jetty can be simply included in your application for demonstration, distribution or deployment. Jetty is available on all Java supported platforms.

Open Source License

Jetty is released under an Open Source License, derived from the Artistic License. Full source code is included in the release. The License puts few restrictions on usage of Jetty, which is free for commercial use and distribution.

The developers of Jetty ask users to inform themselves of the issues, political, legal or otherwise that motivate and threaten the development of Open Source and Free Software.

Proven in Production

Jetty has been widely used in commercial and open source projects and applications, ranging across the full spectrum of runtime environments from hand helds to main frames. To illustrate this diversity, we have put together a (far from exhaustive) list of Jetty Powered products. Here are just a few of highlights:

J2EE Integration

Jetty has been integrated as the web container for the JBoss and JOnAS J2EE application servers. Jetty is the default webapp container for JBoss which gives a complete J2EE solution with HTTP, Servlets, JSPs and EJBs all within a single JVM.

Small & Efficient

Jetty has been optimized by commercial and experimental use since 1995 and a small and efficient server is the result:

HTTP/1.1 Protocol

Jetty supports the HTTP/1.0 and HTTP/1.1 protocols. The 1.1 protocol offers much greater network performance. Furthermore, as the HTTP server and the Servlet container and in the same JVM, this gives simpler configuration, much greater performance and full access to all server resources from within servlets.

Serving Servlets

Jetty supports the javax.servlet. API defined by JavaSoft:
Servlets are protocol- and platform-independent server side components, written in Java, which dynamically extend Java-enabled servers. They provide a general framework for services built using the request-response paradigm. [Javasoft's Java Servlet API White Paper]
There are versions of Jetty for all versions of the servlet spec. The latest 2.3 spec is supported by the Jetty4 releases.

Java Server Pages

Jetty includes a JSP package, which implements Java Server Pages, a method for adding dynamic content to HTML pages. Currently this is the Jasper JSP engine from apache.

SSL Support

Jetty has a SunJsseListener which uses Sun's JSSE reference implementation to provide support for HTTPS. It is even possible to use the same pair of public/private keys as a pre-existing apache server by using the KeyPairTool to load the private key and its certificate into a keystore for JSSE.

If the use of a commercial SSL implementation is required, FORGE have contributed a listener which allows their Protekt product to be used as an SSL provider. A similar approach may be used to integrate other SSL implementations.

Modular Architecture

Jetty request handling is based on collections of abstracted request listeners and handlers. All Jetty features are provided by specializations of these abstract components. This allows Jetty's behaviour to be extended and/or enhanced by the addition of extra listeners and handlers.

The associated JettyExtra module contains extensions such as JMX configuration and SASL authentication.

Embeddable

For many applications, HTTP is just another interface protocol. Jetty can easily be embedded in such applications and products without adopting a WWW centric application architecture. Examples of embedded Jetty usage include:

Flexible Configuration

Jetty has been designed to highly configurable and flexible. It can be used as a stand-alone server running application servlets or it can be embedded in java application to provide a WWW interface to the services that they provide. The configuration of a server is controlled by: