FileDocCategorySizeDatePackage
ServletInPlaceClass.javaAPI DocExample867Tue Mar 16 11:58:34 GMT 2004org.cookbook.ch11

ServletInPlaceClass.java

package org.cookbook.ch11;

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

public class ServletInPlaceClass extends HttpServlet 
{
    public void doGet(HttpServletRequest request,
        HttpServletResponse response)
        throws IOException, ServletException
    {
        response.setContentType("text/html");
        PrintWriter out = response.getWriter();

        out.println("<HTML>");
        out.println("<HEAD>");
        out.println("<TITLE>");
        out.println("A New Servlet");
        out.println("</TITLE>");
        out.println("</HEAD>");
        out.println("<BODY>");
        out.println("<H1>");
        out.println("A New Servlet");
        out.println("</H1>");
        out.println("Editing servlets in place");
        out.println("</BODY>");
        out.println("</HTML>");
    }
}