title: deploying another war in embedded jetty
body: <p>I am a no bee to stack over flow. Apologize if i broke any rules.</p>
  
  <p>I can start jetty embedded server but i want to deploy a war before starting the server in the same program. i kept my external war in another folder and i tried with the below code</p>
  
  <pre class="lang-java prettyprint-override"><code>final Server server = new Server();
      final WebAppContext webapp = new WebAppContext();
      webapp.setContextPath("/");
      final URL url = Main.class.getResource("war1.war");
      final String a = url.getPath();
      System.out.println(a);
      webapp.setWar(a);
      webapp.setExtractWAR(true);
      webapp.setCopyWebInf(true);
      server.setHandler(webapp);
  
      server.start();
      server.join();
  </code></pre>
  
  <p>This is giving a error. please guide me if i did anything wrong. </p>
  
  <pre class="lang-none prettyprint-override"><code>2013-11-27 12:59:01.992:WARN:oejw.WebAppContext:Failed startup of context o.e.j.w.WebAppContext{/,[file:/C:/Users/admin/AppData/Local/Temp/JettyContext1841794772027580678/webinf/, file:/C:/Users/admin/AppData/Local/Temp/JettyContext1841794772027580678/webapp/]},/C:/Users/admiin/Documents/workspace-sts-3.1.0.RELEASE/JettyRunner/target/classes/war1.war
  MultiException[java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspSourceDependent, java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspSourceDependent, java.lang.NoClassDefFoundError: org/apache/jasper/runtime/JspSourceDependent]
      at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:718)
      at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:263)
      at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1238)
      at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706)
      at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:480)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95)
      at org.eclipse.jetty.server.Server.doStart(Server.java:277)
      at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64)
      at Main.main(Main.java:39)
  </code></pre>
  
  <p>please let me know if i need to do anything else. My goal is to deploy a external war with a embedded tomcat/jetty server (any webserver). </p>