diff --git a/jetty-documentation/src/main/asciidoc/configuring/deploying/chapter.adoc b/jetty-documentation/src/main/asciidoc/configuring/deploying/chapter.adoc index a466727a51e..2155226c762 100644 --- a/jetty-documentation/src/main/asciidoc/configuring/deploying/chapter.adoc +++ b/jetty-documentation/src/main/asciidoc/configuring/deploying/chapter.adoc @@ -21,7 +21,7 @@ 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. +It also includes information about the Deployment Manager and WebApp Provider. include::anatomy-of-a-webapp.adoc[] include::automatic-webapp-deployment.adoc[] diff --git a/jetty-documentation/src/main/asciidoc/configuring/deploying/deployment-architecture.adoc b/jetty-documentation/src/main/asciidoc/configuring/deploying/deployment-architecture.adoc index bc58be3c299..55000f4fe6c 100644 --- a/jetty-documentation/src/main/asciidoc/configuring/deploying/deployment-architecture.adoc +++ b/jetty-documentation/src/main/asciidoc/configuring/deploying/deployment-architecture.adoc @@ -32,8 +32,8 @@ image:images/Jetty_DeployManager_DeploymentManager_Roles.png[image,width=195] [[udm-application-providers]] ==== Application Providers -Before Jetty deploys an application, an link:{JDURL}/org/eclipse/jetty/deploy/AppProvider.html[AppProvider] identifies the App and then provides it to the `DeploymentManager`. -The main `AppProvider` with the Jetty distribution is the link:{JDURL}/org/eclipse/jetty/deploy/providers/WebAppProvider.html[WebAppProvider.] +Before Jetty deploys an application, an link:{JDURL}/org/eclipse/jetty/deploy/AppProvider.html[`AppProvider`] identifies the App and then provides it to the `DeploymentManager`. +The main `AppProvider` with the Jetty distribution is the link:{JDURL}/org/eclipse/jetty/deploy/providers/WebAppProvider.html[`WebAppProvider`.] [[udm-application-lifecycle-graph]] ==== Application LifeCycle Graph @@ -63,15 +63,35 @@ Examples of new `AppLifeCycle.Binding` implementations that can be developed inc There are four default bindings: -* link:{JDURL}/org/eclipse/jetty/deploy/bindings/StandardDeployer.html[StandardDeployer] — Deploys the ContextHandler into Jetty in the appropriate place. -* link:{JDURL}/org/eclipse/jetty/deploy/bindings/StandardStarter.html[StandardStarter] — Sets the ContextHandler to started and start accepting incoming requests. -* link:{JDURL}/org/eclipse/jetty/deploy/bindings/StandardStopper.html[StandardStopper] — Stops the ContextHandler and stops accepting incoming requests. -* link:{JDURL}/org/eclipse/jetty/deploy/bindings/StandardUndeployer.html[StandardUndeployer] — Removes the ContextHandler from Jetty. +* link:{JDURL}/org/eclipse/jetty/deploy/bindings/StandardDeployer.html[`StandardDeployer`] — Deploys the ContextHandler into Jetty in the appropriate place. +* link:{JDURL}/org/eclipse/jetty/deploy/bindings/StandardStarter.html[`StandardStarter`] — Sets the ContextHandler to started and start accepting incoming requests. +* link:{JDURL}/org/eclipse/jetty/deploy/bindings/StandardStopper.html[`StandardStopper`] — Stops the ContextHandler and stops accepting incoming requests. +* link:{JDURL}/org/eclipse/jetty/deploy/bindings/StandardUndeployer.html[`StandardUndeployer`] — Removes the ContextHandler from Jetty. image:images/Jetty_DeployManager_DefaultAppLifeCycleBindings.png[image,width=851] A fifth, non-standard binding, called link:{JDURL}/org/eclipse/jetty/deploy/bindings/DebugBinding.html[DebugBinding], is also available for debugging reasons; it logs the various transitions through the Application LifeCycle. +===== Using GlobalWebappConfigBinding + +In addition to the LifeCycle bindings discussed above, there is also the link:https://www.eclipse.org/jetty/javadoc/current/org/eclipse/jetty/deploy/bindings/GlobalWebappConfigBinding.html[`GlobalWebappConfigBinding`] which, when added to the `DeploymentManager` will apply an additional configuration XML file to each webapp that it deploys. +This can useful when setting server or system classes, or when defining link:#override-web-xml[override descriptors.] +This configuration XML file will be _in addition to_ any context XML file that exists for the webapp; it will be applied _after_ any context XML files but _before_ the webapp is started. +The format for the XML file is the same as any context XML file and can be used to same parameters for a webapp. + +To use this binding, you can either modify the existing `jetty-deploy.xml` which comes with the Jetty distribution (be sure to link:#startup-base-and-home[copy it to your $JETTY_BASE/etc directory first]), or by link:#custom-modules[creating a new module] file which calls to an additional XML file. + +[source, xml, subs="{sub-order}"] +---- + + + + /etc/global-webapp-config.xml + + + +---- + [[default-web-app-provider]] ==== Understanding the Default WebAppProvider @@ -119,7 +139,7 @@ monitoredDirName:: The file path or URL to the directory to scan for web applications. Scanning follows these rules: - + 1. A base directory must exist. 2. Hidden Files (starting with `"."`) are ignored. 3. Directories with names ending in `".d"` are ignored. diff --git a/jetty-documentation/src/main/asciidoc/configuring/deploying/setting-deployment-bindings.adoc b/jetty-documentation/src/main/asciidoc/configuring/deploying/setting-deployment-bindings.adoc deleted file mode 100644 index 6dc961b3530..00000000000 --- a/jetty-documentation/src/main/asciidoc/configuring/deploying/setting-deployment-bindings.adoc +++ /dev/null @@ -1,44 +0,0 @@ -// -// ======================================================================== -// Copyright (c) 1995-2018 Mort Bay Consulting Pty. Ltd. -// ======================================================================== -// All rights reserved. This program and the accompanying materials -// are made available under the terms of the Eclipse Public License v1.0 -// and Apache License v2.0 which accompanies this distribution. -// -// The Eclipse Public License is available at -// http://www.eclipse.org/legal/epl-v10.html -// -// The Apache License v2.0 is available at -// http://www.opensource.org/licenses/apache2.0.php -// -// You may elect to redistribute this code under either of these licenses. -// ======================================================================== -// - -[[setting-deployment-bindings]] -=== Setting Deployment Bindings - -Jetty provides __deployment bindings__, which allows access to the application lifecycle of `DeploymentManager`. - -There are a handful of bindings that exist within the core distribution of Jetty: - -* `StandardDeployer` (deploying)–Standard binding that deals with deploying a webapp. -* `StandardStarter` (starting)–Standard binding that deals with starting a webapp. -* `StandardStopper` (stopping)–Standard binding that deals with stopping a webapp. -* `StandardUndeployer` (undeploying)–Standard undeployer that deals with undeploying a webapp. -* `DebugBinding` (any specified)–Attaches a binding and prints logging information of a context going through the specified binding target. -* `GlobalWebappConfigBinding` (deploying)–Allows the user to override various settings of a webapp's context globally for all contexts. -+ -[source, xml, subs="{sub-order}"] ----- - - - - file:///etc/global-webapp-context-config.xml - - - - ----- -* OrderedGroupBinding (any specified)–Allows the user to set a specific order for bindings to process in a given binding target. diff --git a/jetty-documentation/src/main/asciidoc/configuring/deploying/static-content-deployment.adoc b/jetty-documentation/src/main/asciidoc/configuring/deploying/static-content-deployment.adoc index dfe2fbcf72e..275bae8f056 100644 --- a/jetty-documentation/src/main/asciidoc/configuring/deploying/static-content-deployment.adoc +++ b/jetty-documentation/src/main/asciidoc/configuring/deploying/static-content-deployment.adoc @@ -24,20 +24,17 @@ Create a file called `scratch.xml` in the `${jetty.base}/webapps` directory and [source, xml, subs="{sub-order}"] ---- - /scratch -   /home/jesse/scratch +   /home/scratch true - - ---- This is a very basic setup for serving static files.