01: /* *****************************************************************************
02: * LZNullServlet.java
03: * ****************************************************************************/
04:
05: /* J_LZ_COPYRIGHT_BEGIN *******************************************************
06: * Copyright 2001-2004 Laszlo Systems, Inc. All Rights Reserved. *
07: * Use is subject to license terms. *
08: * J_LZ_COPYRIGHT_END *********************************************************/
09:
10: package org.openlaszlo.servlets;
11:
12: import java.io.*;
13: import java.net.*;
14: import java.util.*;
15: import javax.servlet.*;
16: import javax.servlet.http.*;
17:
18: /**
19: * LZNullServlet is a simple servlet for testing Tomcat performance.
20: */
21: public class LZNullServlet extends HttpServlet {
22:
23: public void init(ServletConfig config) throws ServletException {
24: super .init(config);
25:
26: log("Initializing LZNullServlet!");
27:
28: }
29:
30: public void doGet(HttpServletRequest req, HttpServletResponse res)
31: throws IOException {
32: res.setContentType("text/html");
33: ServletOutputStream out = res.getOutputStream();
34:
35: out
36: .println("<html><head><title>X</title></head><body></body></html>");
37: out.close();
38: }
39:
40: public void doPost(HttpServletRequest req, HttpServletResponse res)
41: throws IOException {
42: doGet(req, res);
43: }
44: }
|