1 6 7 package org.netbeans.test.performance; 8 9 import java.io.*; 10 import java.net.*; 11 12 import javax.servlet.*; 13 import javax.servlet.http.*; 14 15 20 public class TestServlet extends HttpServlet { 21 22 24 public void init(ServletConfig config) throws ServletException { 25 super.init(config); 26 27 } 28 29 31 public void destroy() { 32 33 } 34 35 39 protected void processRequest(HttpServletRequest request, HttpServletResponse response) 40 throws ServletException, IOException { 41 response.setContentType("text/html"); 42 PrintWriter out = response.getWriter(); 43 53 out.close(); 54 } 55 56 60 protected void doGet(HttpServletRequest request, HttpServletResponse response) 61 throws ServletException, IOException { 62 processRequest(request, response); 63 } 64 65 69 protected void doPost(HttpServletRequest request, HttpServletResponse response) 70 throws ServletException, IOException { 71 processRequest(request, response); 72 } 73 74 76 public String getServletInfo() { 77 return "Short description"; 78 } 79 80 } 81 | Popular Tags |