title: How can I deploy a WAR in an embedded Jetty 8?
body: <p>With the following code, how can I deploy a WAR application located on the classpath ?</p>
  
  <pre><code>private Server s; 
  
  @BeforeClass
  public static void setUp() throws Exception {
      // Start http server
      Random r = new Random();
      int port = 1024 + r.nextInt(8976);
      s = new Server(new InetSocketAddress("127.0.0.1", port));
  
      // Add my WAR for deployment here ...
  
      s.start();
  }
  </code></pre>
  
  <p><strong>Jetty 8.0.1</strong><br>
  <strong>JDK 6</strong></p>