FileDocCategorySizeDatePackage
Hello.javaAPI DocExample738Thu Apr 05 01:18:18 BST 2001None

Hello

public class Hello extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)


    res.setContentType("text/html");
    PrintWriter out = res.getWriter();

    String name = req.getParameter("name");
    out.println("<HTML>");
    out.println("<HEAD><TITLE>Hello, " + name + "</TITLE></HEAD>");
    out.println("<BODY>");
    out.println("Hello, " + name);
    out.println("</BODY></HTML>");
  
public java.lang.StringgetServletInfo()

    return "A servlet that knows the name of the person to whom it's" + 
           "saying hello";