Cargo : Static deployment of WAR
This page last changed on Nov 15, 2006 by vmassol.
DefinitionDeploy a WAR that will be started when the container starts ExampleLet'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 Jun 14, 2011 22:09 |