Called when the user clicks on a link to this servlet
// Get a writer to generate the reply to user's browser
PrintWriter out = response.getWriter();
// Generate the HTTP header to say the response is in HTML
response.setContentType("text/html");
out.println("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"");
out.println("\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"");
out.println(">");
out.println();
out.println("<html><head><title>Hello from a Servlet</title></head>");
out.println("<body>");
out.println("<h1>Hello from a Servlet</h1>");
out.println("<p>This servlet ran at ");
out.println(new Date().toString());
out.println("</p>");
out.println("<p>Courtesy of " +
"$Id: HelloServlet.java,v 1.3 2002/03/29 15:00:49 ian Exp $</p>");
out.println("</body></html>");