Java Servlets (contd.)
public void service(ServletRequest req, ServletResponseres)
throws ServletException, IOException{
PrintStream out = newPrintStream(res.getOutputStream());
out.println("Hello world!");
public String getServletInfo() {
return "Hello World Servlet";