Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Howto/Deploy Web Applications"

< Jetty‎ | Howto
Line 9: Line 9:
 
* If the webapp is called root.war or the directory is called root/ then it will be deployed at the / context.
 
* If the webapp is called root.war or the directory is called root/ then it will be deployed at the / context.
  
Webapp deployment was controlled the [[http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/WebAppDeployer.html WebAppDeployer]] class.  From 7.0.2 onwards this has been replaced by the [[http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/providers/WebAppProvider.html WebAppProvider]] of the [[http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/DeploymentManager.html DeploymentManager]].
+
Webapp deployment was controlled the [http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/WebAppDeployer.html WebAppDeployer] class.  From 7.0.2 onwards this has been replaced by the [http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/providers/WebAppProvider.html WebAppProvider] of the [http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/DeploymentManager.html DeploymentManager].
  
See also older (but mostly relevant) [[http://docs.codehaus.org/display/JETTY/WebAppDeployer Jetty-6 WebAppDeployer]] documentation.
+
See also older (but mostly relevant) [http://docs.codehaus.org/display/JETTY/WebAppDeployer Jetty-6 WebAppDeployer] documentation.
  
  
 
=== Contexts Deployment ===
 
=== Contexts Deployment ===
  
 +
The $JETTY_HOME/contexts directory is scanned at runtime for context.xml files, that describe either:
 +
* a standard war file (or directory), plus additional configuration.
 +
* a custom jetty context.
  
 +
Webapp deployment was controlled the [http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/ContextDeployer.html ContextDeployer] class.  From 7.0.2 onwards this has been replaced by the [http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/providers/ContextProvider.html ContextProvider] of the [http://download.eclipse.org/jetty/stable-7/apidocs/org/eclipse/jetty/deploy/DeploymentManager.html DeploymentManager].
 +
 +
See also older (but mostly relevant) [http://docs.codehaus.org/display/JETTY/ContextDeployer Jetty-6 ContextDeployer] documentation.
 
}}
 
}}

Revision as of 21:29, 4 February 2010



Introduction

Jetty can deploy web applications as war files (packed or unpacked), as provided or with overridden configuration, with static or hot deployment.


Steps

Webapps Deployment

The $JETTY_HOME/webapps directory is scanned at startup for webapplications to deploy:

  • The file foo.war will be deployed as a webapp at context /foo
  • The directory foo/ will be deployed at context /foo. If the directory has a WEB-INF subdirectory, it will be treated as servlet webapp, otherwise it will served only as static content.
  • If both a foo.war and a foo/ directory exists, then the one with the most recent last-modified date is used.
  • If the webapp is called root.war or the directory is called root/ then it will be deployed at the / context.

Webapp deployment was controlled the WebAppDeployer class. From 7.0.2 onwards this has been replaced by the WebAppProvider of the DeploymentManager.

See also older (but mostly relevant) Jetty-6 WebAppDeployer documentation.


Contexts Deployment

The $JETTY_HOME/contexts directory is scanned at runtime for context.xml files, that describe either:

  • a standard war file (or directory), plus additional configuration.
  • a custom jetty context.

Webapp deployment was controlled the ContextDeployer class. From 7.0.2 onwards this has been replaced by the ContextProvider of the DeploymentManager.

See also older (but mostly relevant) Jetty-6 ContextDeployer documentation.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.