Cargo : Static deployment of WAR
This page last changed on Jul 17, 2005 by vmassol.
DefinitionDeploy a WAR that will be started when the container starts ExampleLet'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( new JettyStandaloneConfiguration("target/jetty4x")); Deployable war = container.getDeployableFactory().createWAR( "src/data/some.war"); container.getConfiguration().addDeployable(war); container.start(); |
![]() |
Document generated by Confluence on Jul 21, 2005 06:52 |