package com.watchitlater.spring.webapp;

import org.mortbay.jetty.Server;
import org.mortbay.jetty.webapp.WebAppContext;

public class WebServer {

    private Server server;

    public WebServer(int port) {
        server = new Server(port);
    }

    public WebServer start() throws Exception {
        server.addHandler(new WebAppContext("src/test/webapp", "/stringtemplate"));
        server.start();
        return this;
    }

    public void stop() {
        try {
            server.stop();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static void main(String[] args) throws Exception {
        new WebServer(8080).start();
    }
}

@@ -167,16 +167,44 @@
  server;
+%0A    private final int port;
 %0A%0A    pu
@@ -242,33 +242,24 @@
     
-server = new Server(
+this.port = 
 port
-)
 ;%0A  
@@ -303,32 +303,145 @@
 ows Exception %7B%0A
+        System.setProperty(%22org.mortbay.xml.XmlParser.Validating%22, %22false%22);%0A%0A        server = new Server(port);%0A
         server.a
@@ -508,16 +508,16 @@
 ate%22));%0A
-
         
@@ -528,24 +528,25 @@
 er.start();%0A
+%0A
         retu

use non-validating parser in jetty to start up faster