This page last changed on Apr 25, 2005 by vmassol.

Definition

Deploy a WAR that will be started when the container starts

Example

Let's see how to use Jetty 4.x (in embedded mode) with a WAR to deploy in it.

Note: Unlike the other containers, the Jetty integration does not require the Jetty container to be installed. You simply need to add the Jetty jar (org.mortbay.jetty.jar), the Servlet API jar (servletapi.jar), and the Tomcat Jasper jars (jasper-compiler.jar, jasper-runtime.jar) to your classpath. Thus the homeDir property has not effect.

Container container = new Jetty4xEmbeddedContainer();

Deployable war = container.getDeployableFactory().createWAR("src/data/some.war");
container.getConfiguration().addDeployable(war);

container.start();
Document generated by Confluence on Apr 30, 2005 12:52