FileDocCategorySizeDatePackage
Servlet_DoGetPost.javaAPI DocExample1400Sat Oct 27 15:57:20 BST 2001None

Servlet_DoGetPost

public class Servlet_DoGetPost extends HttpServlet

Fields Summary
Constructors Summary
Methods Summary
public voiddoGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Called in response to a GET request (data encoded in the URL)


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

		// BOILERPLATE beginning
		out.println("<HTML>");
		out.println("<HEAD><TITLE>Servlet Output</TITLE></HEAD>");
		out.println("<BODY>");

		// to do: logic code and main HTML goes here.

		// BOILERPLATE ending
		out.println("</BODY>");
		out.println("</HTML>");
		out.close();
	
public voiddoPost(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
Called in response to a POST request (data unencoded on the socket)


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

		// BOILERPLATE beginning
		out.println("<HTML>");
		out.println("<HEAD><TITLE>Servlet Output</TITLE></HEAD>");
		out.println("<BODY>");

		// to do: logic code and main HTML goes here.

		// BOILERPLATE ending
		out.println("</BODY>");
		out.println("</HTML>");
		out.close();