package com.engineyard.javademo;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class HelloServlet extends HttpServlet {
	/**
	 * 
	 */
	private static final long serialVersionUID = 8447571599556573671L;

	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
	{
		response.setContentType("text/html");
		response.setStatus(HttpServletResponse.SC_OK);
		response.getWriter().println("<title>Java on Engine Yard</title></head>");
		response.getWriter().println("<h1>I'm running Java on Engine Yard</h1>");
		response.getWriter().println(
			"<p><img src=\"http://s3.amazonaws.com/engineyard.com/media_files/files/49/original/ey-java.jpg\" />");
		response.getWriter().println("<h2>Hello Servlet</h2>");
		response.getWriter().println("session=".concat(request.getSession(true).getId()));
	}

}

@@ -701,27 +701,121 @@
 Java on 
-Engine Yard
+%22%0A%09%09%09+ + getServletContext().getServerInfo() %0A%09%09%09+ %22 on Engine Yard, at %22 %0A%09%09%09+ new Date().toString() + %22
 %3C/h1%3E%22);

include app server type in servlet output