This page last changed on Nov 15, 2006 by vmassol.

Definition

Deploy a WAR that will be started when the container starts

Example

Let's see how to use Jetty 4.x (an embedded container) 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 home property has not effect.

LocalContainer container = new Jetty4xEmbeddedLocalContainer(
    new JettyStandaloneConfiguration("target/jetty4x"));

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

container.start();
Document generated by Confluence on Aug 25, 2010 07:10