Chapter 1 Overview

Jetty 6 is a fully featured open source web server for static and dynamic content. Under the guidance of Mort Bay Consulting, this web server is designed and developed to provide all functionalities of an HTTP Server and Servlet Container through a lightweight, yet fast package. Jetty allows both web server and web application to run in the same process without interconnection overheads and complications. As a pure Java component, you can include Jetty 6 in applications for demonstration, distribution, or deployment. It is available on all Java supported platforms.

Jetty 6 is a new implementation of Jetty HTTP Server and Servlet Container. This web server focuses on third party dependencies by reducing previous dependencies so that it would be easier to embed it with other applications. Jetty 6 has been developed with the concrete foundation of technology which supports different kinds of open source technologies (AJAX Continuations, NIO, JAVA API’s).

Jetty 6 includes a new set of connectors based on Sun’s non-blocking IO (NIO), which can be found in the org.mortbay.jetty.nio package. The NIO libraries allow asynchronous IO to be used, and permit threads to be allocated to connections only when requests are being processed. When a connection becomes idle between requests, its corresponding thread can be returned to a thread pool. The connection,however, can be added to an NIO set that automatically detects new requests. This thread-per-request model allows much greater scaling of connections (users) at the expense of a reduced maximum requests per second for the server as a whole (although in Jetty 6, this expense has been significantly reduced).

Jetty 6 also supports a new feature called Continuations, which allows scalable AJAX applications to be built, with threadless waiting for asynchronous events. Continuations allow a request to be suspended and then resumed at a later time. In addition, a Java Filter or Servlet handling an AJAX request may utilize a Continuation object that can be used to effectively suspend the request and free its corresponding thread. The request resumes after timeout or when a Continuation object makes it so. Thus, Jetty 6 has the faculties to employ innovative strategies to ensure that only required resources are assigned to a connection, and only for the duration of the periods when they are needed. This careful resource management allows Jetty 6 to showcase an architecture that is designed to meet the needs of AJAX applications.

Jetty 6 includes the following new features:

  • Codebase architecture completely restructured and slim-line
  • Continuations API for efficient AJAX polling
  • Improved dependency injection and inversion of control design of components
  • Improved interceptor design of handlers
  • Smart split buffer design for efficient asynchronous flushing and avoiding chunking
  • Optional use of NIO features to optimize transactions


  • Currently 2.97/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5
  Flag Inappropriate Content 0 comments