Jetty Logo
Version: 9.2.7-SNAPSHOT
Contact the core Jetty developers at www.webtide.com

private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services from 1 day to full product delivery

Chapter 4. Deploying to Jetty

Table of Contents

Anatomy of a Web Application
Automatic Web Application Deployment
Configuring a Specific Web Application Deployment
Deployment Processing of WebAppContexts
Configuring Static Content Deployment
Hot Deployment
Deployment Architecture
Quickstart Webapps
Overlay WebApp Deployer

This chapter discusses various ways to deploy applications with Jetty. Topics range from deployment bindings to deploying third party products. It also includes information about the Deployment Manager, WebApp Provider, and Overlay Deployer.

Anatomy of a Web Application

The standard Jetty distribution is capable of deploying standard Servlet Spec Web Applications, and Jetty internal ContextHandler deployment descriptors, or even a mix of the two.

Web Applications are deployable collections of dynamic (servlets, filters, jsps, etc..) and static content, support libraries, and descriptive metadata that are bound to a specific context path on Jetty.

Ultimately the format and layout are defined by the Servlet Spec, and you should consult the official Servlet Spec documentation for a more detailed understanding of Web Application layout and structure, however this will outline basics about how Jetty views these requirements.

Web Applications can be bundled into a single Web Archive (WAR file) or as a directory tree.

/WEB-INF/

Special Servlet API defined directory used to store anything related to the Web Application that are not part of the public access of the Web Application.

If you have content that is accessed by your Web Application internally, but that should also never be accessed directly by a web browser, this is the directory you would place them in.

/WEB-INF/web.xml

Required deployment descriptor defining various behavior of your Web Application.

/WEB-INF/classes/

Location for Web Application specific compiled java classes

/WEB-INF/lib/

Directory for JAR files (libraries)

The Jetty internal WebAppClassloader will load classes from /WEB-INF/classes/ first, then from jar files found in /WEB-INF/lib/.

See an error or something missing? Contribute to this documentation at Github!(Generated: 2014-12-19T01:00:25-08:00)