You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Roy Wilson <de...@bellatlantic.net> on 2000/11/11 16:01:10 UTC

The Ping servlet: ONe more time

public class UpperBound extends HttpServlet {        

       static final String msg = "<html>\n" + 
	      "<head><title>UpperBound</title></head>\n" +
	      "<body>\n" +
	      "<h1>UpperBound</h1>\n" +
	      "</body></html>\n";

       static final byte[] bytes = msg.getBytes(); 

       public void service(ServletRequest req, ServletResponse res) 
		throws ServletException, IOException {
		       res.getOutputStream().write(bytes); 
		}
}