Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

"resolved merge problems"

Merge branch 'master' of github.com:apcj/spik

Conflicts:
	.idea/workspace.xml
  • Loading branch information...
commit bc4fd8acad727276bfb87a639f9092313e0d876e 2 parents 1e91841 + b072b04
Stuart authored
View
2  .gitignore
@@ -1,2 +1,4 @@
out
+jmeter.log
+
View
7 .idea/dictionaries/alistair.xml
@@ -0,0 +1,7 @@
+<component name="ProjectDictionaryState">
+ <dictionary name="alistair">
+ <words>
+ <w>spik</w>
+ </words>
+ </dictionary>
+</component>
View
18 src/main/java/spik/webapp/BasicServlet.java
@@ -7,28 +7,14 @@
import java.io.IOException;
import java.util.Date;
-/**
- * Created by IntelliJ IDEA.
- * User: sgreenha
- * Date: Sep 2, 2010
- * Time: 12:25:56 PM
- * To change this template use File | Settings | File Templates.
- */
public class BasicServlet extends HttpServlet{
private String message = "Hello from a basic servlet";
- public BasicServlet(){}
- public BasicServlet(String message) {
- this.message = message;
- }
-
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
{
- response.setContentType("text/html");
- response.setStatus(HttpServletResponse.SC_OK);
- response.getWriter().println("<h1>"+message+"</h1>");
- response.getWriter().println("<h3>Current Time:</h3> " + new Date(System.currentTimeMillis()));
+ response.setContentType("text/plain");
+ response.getWriter().println(message);
}
}
View
14 src/main/java/spik/webapp/HelloWorld.java → src/main/java/spik/webapp/SpikWebApplication.java
@@ -1,32 +1,22 @@
package spik.webapp;
-import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.handler.AbstractHandler;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.servlet.ServletHolder;
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-
-public class HelloWorld {
+public class SpikWebApplication {
public static void main(String[] arguments) {
try {
-
ServletContextHandler context = new ServletContextHandler(ServletContextHandler.SESSIONS);
context.setContextPath("/");
- context.addServlet(new ServletHolder(new BasicServlet()),"/*");
+ context.addServlet(new ServletHolder(new BasicServlet()), "/*");
Server server = new Server(8080);
server.setHandler(context);
server.start();
- server.join();
} catch (Exception e) {
throw new RuntimeException(e);
}
}
-
}
Please sign in to comment.
Something went wrong with that request. Please try again.