Jetty Java HTTP Server

Jetty is an Open Source HTTP Servlet Server written in 100% Java. It is designed to be light weight, high performance, embeddable, extensible and flexible, thus making it an ideal platform for serving dynamic HTTP requests from any Java application.

# Jetty Features

100% Java Open Source Servlet API 2.1 HTTP/1.1 Protocol Modular Architecture GNU Java Server Pages SSL Support Small & Efficient | File serving Session Tracking Server-side Includes Proxy Handling Request Forwarding Response Filtering Server Push Support File upload | Flexible Configuration Utility Classes HTML Generation. Legacy Integration Telephony and SmartCard Support Software Engineering

# Jetty Downloads

Latest Version (<1MB tar.gz) Latest Version Changes Latest Version README | Javadoc Documentation FTP Archive Mailing List Archives

### 100% Java Server Quoting from Javasoft's Java Servlet API White Paper: Java is a great platform for writing the server side of your web-based application. Servlets are emerging as the preferred way of creating highly dynamic WWW services linked to real backend applications and databases. See the growing trend at http://www.servletcentral.com. Java makes it easy to develop and deploy all parts of a professional, maintainable distributed system application. The Servlet API provides you the fastest way to start using Java Server technology in your networked applications. You can start with applications which involve clients and a single server, and gradually create multi-tier enterprise applications which integrate the power and flexibility of Java throughout your existing network ... because Java Servlets run on the software and hardware you've already installed. ### 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. ### Serving Servlets Jetty supports the javax.servlet.* 2.1 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] ### HTTP/1.1 Protocol Jetty supports the HTTP/1.0 and HTTP/1.1 protocols. The 1.1 protocol offers much greater network performance. ### Modular Architecture Jetty request handling is based on stacks of abstracted request handlers. All Jetty features are provided by modular request handlers that are stacked together to provide an optimal set of handlers or new handlers may be written for server extensions. Current Handlers provided with Jetty include: Logging. Basic Authentication. Sessions. Translates. Response Filtering. Servlet Handling. File Serving. Request Forwarding. Proxy Server. Forms, querries & Cookies. Key classes within Jetty are dynamicaly loaded so that they may be replaced with alternate or extended implementations. For example SSL handling is provided by extending the standard HttpListener class. ### GNU Java Server Pages Includes the GNUJSP package, which implements Java Server Pages, a method for adding dynamic content to HTML pages. ### SSL Support A HttpListener extension class has been contributed by FORGE that integrates their Protekt SSL product with Jetty. A similar approach may be used to integrate other SSL implementations. ### Small & Efficient Jetty has been optimized by commercial and experimental use since 1995 and a small and efficient server is the result: A full featured server can be configured in a jar file under 100KB. Optimized parsing is performed on requests. Minimal Object and thread creation. Server performance degrades reasonably under stress. ### 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 an abstract interface of which there are several implementations: Property file driven configuration. Dynamic loading of servlets from path. Dedicated File Serving from current directory. Interpretation of other common server configuration files. Application specific configuration implementations. ### Standard HTTP File serving Jetty can serve standard files like most other HTTP servers and supports: File name extension used to map to MIME type. Default index files for directories. Directory listings Memory cache. PUT and DEL optionally supported. ### Session Tracking Jetty uses it's handler architecture and cookie support to provide user session and browser tracking. Every client session is assigned an ID and session data may be queried, set or modified to allow communication and maintain state between multiple requests from the same same session. ### Server Side Includes HTML Generation requires programming skills, which may not always be available. Jetty has a number of server side inclusion mechanisms that allow authored HTML to be combined with dynamic content. The contents of a file or even results from another HTTP request can be included (embedded) in a page as it is generated or by filtering a response stream. ### Proxy Handling The ProxyHandler implementation of HTTP Handler, allows Jetty to be configured as a proxy server for both FTP and HTTP requests. The results of proxy requests are handled in the same fashion as any other request, so the full features of Jetty may be applied to create intelligent proxy services. ### Request Forwarding When developing a WWW site, it often is desirable to combine the features of several different servers. Jetty can forward requests that it receives to another WWW server and pass the response it back as the response to the original request. While similar to a redirect, forwarding offers several key benefits: The response is passed back through Jetty, so it may be filtered or modified in other ways. The browser only sees a single request and response and two round trips are not required. The client does not need to access the destination server, so it may be placed behind a firewall on a secure network. Jetty thus can act as a HTTP firewall. ### Response Filtering Jetty provides a mechanism to allow filters to be conditionally inserted into the output stream of a response to a request. These filters, which are activated on content type, allow pages arbitrary changes to be made to responses that may have been generated, retrieved from a file or even fetched from another server. Jetty provides a filter for HTML which can use reflection to execute Java method calls embedded in specially formatted HTML comments. This is allows dynamic content to be added to pages that have been statically authored or generated elsewhere. Support is provided to use this mechanism for server side includes and URL embedding. ### Server Push Support Because Jetty assigns each request it own Thread, it is a simple matter for that thread to continue execution and send updates back to the browser, continually or in response to some asynchronous condition. Combined with Multi-part MIME encoding it is possible for the server to update the entire browser frame whenever it chooses. ### File Upload Handling of multipart/form-data streams allows handling of the file input item of HTML forms. ### Utility Classes Bundled with Jetty are several utility packages which form a good basis for a Java software infrastructure for WWW development, including: Code debugging, asserts, warnings and event logging. Test harness for automated regression testing. FTP client package. HTML Generation. JDBC wrappers. Property Tree files. Net and IO utilities. ### HTML Generation While HTML is a simple language to learn and write, it can be also be very tedious, contrived and error prone. Furthermore, authored HTML is a static resource and cannot be customized to each request or updated from a database. Jetty comes with a rich HTML generation package that can be used on its own, with another servlet server or in Jetty servlets. Supported for templated look and feel is a key element of this package. ### Legacy Integration Java is an ideal environment to access a exiting IT resources via JDBC, CORBA or third party interface products. Jetty allows these existing IT resources to be represented as dynamic WWW services and forms an ideal middle tier of a three tiered client-server solution. Furthermore, The ability of Jetty to get responses from other HTTP servers and modify or embed them in other pages, allows multiple services to be combined into a single consistent WWW presence. Thus existing systems can be used while migrating to a dynamic WWW approach. ### Telephony and SmartCard Support Jetty has been used as the basis for the products developed by Intelligent Switched Systems CallAccess allows integration of WWW and Telephony services into a single service environment. Client calls can be handled by both automatic IVR, WWW directed operators or a combination of both. WWW sites can be telephony enabled to call clients at their request. SmartAccess provides a SmartCard authentication platform that uses tones generated by the smartcard to identify a client over the phone or over the WWW. The system provides fraud prevention and detection for accidental, malicious and systematic attacks. ### Software Engineering Traditional WWW development using authored HTML pages is not a scalable approach for the development of significant WWW sites, nor does CGI access provide and adequate mechanism for accessing dynamic state of a running application. The authored HTML plus CGI approach creates configuration and maintenance problems for even small sites. Using the highly productive Java programming environment for WWW server development allows object oriented software engineering techniques to be applied to: Extraction of common elements for re-use within the site and potentially between sites. Create a site architecture that supports both generalized behaviour and specialized functionality. Implement and enforce the standards and conventions of a sites Look and Feel. Creation of site specific server-side infrastructure for site development and maintenance by less skilled developers. Configuration control. Build, Testing and release strategies.