Merge branch 'master' of ase.cs.columbia.edu:in-vivo

Jonathan Bell [2012-08-10 02:56:09]
Merge branch 'master' of ase.cs.columbia.edu:in-vivo
Filename
testcase-generation-tester/.classpath
testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java
diff --git a/testcase-generation-tester/.classpath b/testcase-generation-tester/.classpath
index 8b2a61d..59e9444 100644
--- a/testcase-generation-tester/.classpath
+++ b/testcase-generation-tester/.classpath
@@ -9,5 +9,10 @@
 	<classpathentry kind="lib" path="lib/kxml2-2.3.0.jar"/>
 	<classpathentry kind="lib" path="lib/xstream-1.4.2.jar"/>
 	<classpathentry combineaccessrules="false" kind="src" path="/test case generation"/>
+	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-http-7.5.4.v20111024.jar"/>
+	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-io-7.5.4.v20111024.jar"/>
+	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-util-7.5.4.v20111024.jar"/>
+	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-server-7.5.4.v20111024.jar"/>
+	<classpathentry kind="lib" path="/home/nikhil/in-vivo/testcase-generation-tester/lib/jetty-servlet-7.5.4.v20111024.jar"/>
 	<classpathentry kind="output" path="bin"/>
 </classpath>
diff --git a/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java b/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java
index 07d14e9..01d2dc8 100644
--- a/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java
+++ b/testcase-generation-tester/src/edu/columbia/cs/psl/invivo/example/JettyTester.java
@@ -2,12 +2,21 @@ package edu.columbia.cs.psl.invivo.example;

 import java.io.IOException;
 import java.io.UnsupportedEncodingException;
+import java.net.InetAddress;
+import java.util.EventListener;
 import java.util.Scanner;

 import org.eclipse.jetty.http.HttpParser;
 import org.eclipse.jetty.io.Buffer;
 import org.eclipse.jetty.io.ByteArrayBuffer;
 import org.eclipse.jetty.io.View;
+import org.eclipse.jetty.server.LocalConnector;
+import org.eclipse.jetty.server.Server;
+import org.eclipse.jetty.server.bio.SocketConnector;
+import org.eclipse.jetty.server.handler.ErrorHandler;
+import org.eclipse.jetty.server.nio.SelectChannelConnector;
+import org.eclipse.jetty.servlet.FilterHolder;
+import org.eclipse.jetty.servlet.ServletContextHandler;

 public class JettyTester {

@@ -18,16 +27,16 @@ public class JettyTester {
 			// TODO Auto-generated catch block
 			return str.getBytes();
 		}
-	}
+	}

 	public static void main(String[] args) {
 		Scanner scanner = new Scanner(System.in);

 		System.out.println("Enter your input: ");
-		String rawText = "HTTP/1.1 200 OK\r\n"+
+		String rawText = scanner.nextLine();/*"HTTP/1.1 200 OK\r\n"+
 	            "Content-Type: text/html\r\n"+
 	            "Content-Length: 22\r\n"+
-	            "\r\n";
+	            "\r\n";*/

 		ByteArrayBuffer buf = new ByteArrayBuffer(getByteArray(rawText));
 		View view = new View(buf);