users@glassfish.java.net

Re: Accessing a servlet url without a web browser

From: <glassfish_at_javadesktop.org>
Date: Mon, 21 Apr 2008 00:59:34 PDT

In addition to my previous post some insights.

First I can see what is happening to you on telnet. It has nothing to do with timeouts but with Windows' telnet client and Grizzly (most probably a bug within Grizzly). As soon as the first character is send (no matter which) the client returns.

I have done some wiresharking to see what is happening. On Windows XP the included telnet-implementation acts weird (though not incorrect). I have not seen this on any other OS which might be the reason, why I - and probably others on this forum and mailing list - didn't get your problem before.

So Windows' telnet client sends every key in a TCP-packet on its own. Any other telnet client sends complete lines. Now I guess this is a bug in Grizzly since I do believe it is perfectly legal to send every byte in a packet on its own. Apache HTTP as well as Tomcat work perfectly well with single-byte packets.

Maybe Jean Francois (or others) from the Grizzly project can add some insights to this. I will post a link to this thread to the developer-list of Glassfish.


Now back to your original posting: You've written that you are using a socket to send the request. If your problem is related to sending your request byte by byte you should consider sending complete lines instead. I guess this would be a viable workaround for the time being. It would also reduce network traffic and should be faster than sending single bytes.

--
Wolfram Rittmeyer
[Message sent by forum member 'writtmeyer' (writtmeyer)]
http://forums.java.net/jive/thread.jspa?messageID=270318