Web Application Deployer
The WebAppDeployer replaces the static method call org.mortbay.jetty.webapp.WebAppContext.addWebApplications that was used to discover and deploy webapplication during startup. This method is now deprecated, but still works (by calling an instance of WebApplicationDeployer).
The basic operation of WebAppDeployer is to scan a directory at startup for WAR files or webapp directories and the deploy the webapplications found. Typically this is done from a jetty.xml file:
The WebAppDeployer is added to the server as a LifeCycle. This simply means that the deployer will be started and stopped with the server. Ie when server.start() is called, then start will also be called on the deployer.
The context passed in is a reference to a HandlerContainer in which the discovered webapps will be deployed. This is normally an instance of ContextHandlerCollection.
The webAppDir is a file path or URL to the directory to scan for webapplications. Zip files ending with .war or .zip are deployed. Directories not call CVS are also deployed. The basename of the war (eg foo from foo.war) or the directory name are used as the context path of the discovered webapps, unless the name is "root", in which case the context path of / is used.
The parentLoaderPriority parameter is a boolean that selects of the standard java parent first delegation classloading will be used or the servlet specification webapp classes first priority.