import java.io.*;
import javax.servlet.http.*;
import java.util.*;

public class HelloWorld extends HttpServlet {
    protected void doGet(HttpServletRequest req, HttpServletResponse resp) 
            throws IOException {
        PrintWriter writer = resp.getWriter();
        writer.print("Greetings: Hello World!\nThis is my JSP example.\n");
        writer.print("The current date is: " + new Date());
        writer.flush();
    }
    public static void main (String argv[]) {
        System.out.println("Hello World!\n");
    }
}
