The Ping servlet: ONe more time

2000-11-11 Thread Roy Wilson

public class UpperBound extends HttpServlet {

   static final String msg = "html\n" + 
  "headtitleUpperBound/title/head\n" +
  "body\n" +
  "h1UpperBound/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); 
}
} 

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: The Ping servlet

2000-11-11 Thread cmanolache


 Hi,
 I couldn't locate the Ping Servlet, but did get one very close to it 
 called the UpperBound Servlet, which is attached. I haven't tried it.
 Roy

In tomcat3(.3 - the main branch ) there are 2 servlets - Hello and HelloW,
both can be used for PingServlet.
( they display 100 bytes of data, of course you can reduce that to 10 or
0).

( the first is using OutputStream, it's good to evaluate the impact of
Writer and how fast binary data is handled )

Costin

Title: UpperBound
public class UpperBound extends HttpServlet {

   static final String msg = "\n" + 
	  "\n" +
	  "\n" +
	  "UpperBound\n" +
	  "\n";

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

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

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


The Ping servlet

2000-11-09 Thread Roy Wilson
 filename="text1.rtf"filename="text1.rtf"