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/Feature/Hot Deployment"

< Jetty‎ | Feature
m
Line 3: Line 3:
 
Jetty provides capability to deploy an arbitrary context or web application with Jetty-specific configuration. This capability is implemented via ContextDeployer mechanism.
 
Jetty provides capability to deploy an arbitrary context or web application with Jetty-specific configuration. This capability is implemented via ContextDeployer mechanism.
 
| body =
 
| body =
The [http://dev.eclipse.org/viewcvs/index.cgi/jetty/trunk/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/ContextDeployer.java?root=RT_JETTY&view=markup ContextDeployer] may be used to (hot)deploy an arbitrary Context or Web Application with Jetty specific configuration. To statically deploy only standard web applications at startup, use the [[JETTY/Feature/WebAppDeployer|WebAppDeployer].
+
The [http://dev.eclipse.org/viewcvs/index.cgi/jetty/trunk/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/ContextDeployer.java?root=RT_JETTY&view=markup ContextDeployer] may be used to (hot)deploy an arbitrary Context or Web Application with Jetty specific configuration. To statically deploy only standard web applications at startup, use the [[JETTY/Feature/WebAppDeployer|WebAppDeployer]].
  
 
==Overview==
 
==Overview==

Revision as of 18:47, 18 June 2010



Introduction

Jetty provides capability to deploy an arbitrary context or web application with Jetty-specific configuration. This capability is implemented via ContextDeployer mechanism.

Feature

The ContextDeployer may be used to (hot)deploy an arbitrary Context or Web Application with Jetty specific configuration. To statically deploy only standard web applications at startup, use the WebAppDeployer.

Overview

Typically a ContextDeployer is defined in a jetty.xml file:

 
 <Call name="addLifeCycle">
   <Arg>
     <New class="org.eclipse.jetty.deployer.ContextDeployer">
       <Set name="contexts"><Ref id="Contexts"</Set>
       <Set name="configurationDir"><SystemProperty name="jetty.home" default="."/>/contexts</Set>
       <Set name="scanInterval">1</Set>
     </New>
   </Arg>
 </Call>

The ContextDeployer will scan the configurationDir directory at intervals of scanInterval seconds for xml descriptors that define contexts. Any contexts found are deployed to the passed contexts reference to a HandlerContainer (this is normally an instance of ContextHandlerCollection).

The deployment descriptors are in [Jetty/Reference/jetty.xml syntax

Back to the top