1 package gacl.servlet.study;
2
3 import java.io.IOException;
4 import java.io.PrintWriter;
5
6 import javax.servlet.ServletException;
7 import javax.servlet.http.HttpServlet;
8 import javax.servlet.http.HttpServletRequest;
9 import javax.servlet.http.HttpServletResponse;
10
11 public class ServletDemo1 extends HttpServlet {
12
13 /**
14 * The doGet method of the servlet. <br>
15 *
16 * This method is called when a form has its tag value method equals to get.
17 *
18 * @param request the request send by the client to the server
19 * @param response the response send by the server to the client
20 * @throws ServletException if an error occurred
21 * @throws IOException if an error occurred
22 */
23 public void doGet(HttpServletRequest request, HttpServletResponse response)
24 throws ServletException, IOException {
25
26 response.setContentType("text/html");
27 PrintWriter out &