FileDocCategorySizeDatePackage
ServletExample.javaAPI DocExample986Mon Mar 29 16:25:48 BST 2004org.cookbook.ch04

ServletExample.java

/*
 * Created on Feb 17, 2004
 *
 * To change the template for this generated file go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
package org.cookbook.ch04;

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

/**
 * @author Steven Holzner
 *
 * To change the template for this generated type comment go to
 * Window>Preferences>Java>Code Generation>Code and Comments
 */
public class ServletExample 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("Using Servlets");
		out.println("</TITLE>");
		out.println("</HEAD>");
		out.println("Using Servlets");
		out.println("</BODY>");
		out.println("</HTML>");
	}
}