This being the case I have a couple of questions: 1. While sending the response to client if the browser threw out the connection does the servlet get an IOException? If so does it just ignore it and throw out the thread serving that request? Could this be the reason for ugly broken pipe errors in Apache logs?
2. Expanding on the previous point I have a servlet that writes bytes to the output stream gotten from the HTTPServletResponse but have noticed that a closed browser session is not always detected by the servlet. It takes a number of bytes to finally detect the socket as being closed because I presume the output is buffered. What controls the buffer length? On the other hand when there isn't any data being sent to the socket but it has been closed by the browser I would assume that there is a timeout set on it so that it is closed but who sets it? Thanks, d. Nic Ferrier wrote: >>Ah! So what happens if your servlet takes a more than a few seconds >>between accepting the request and issueing the response? Will the >>browser display the first page it receives, and then then overwrite it >>with each subsequant page it receives? >> > > Ok. I think you need to think about this a bit: > > When you make a request this is what happens in terms of sockets. > > tcp connection > user(browser) --------------------------> servlet > > > If you make a request to the servlet and then press the refresh > button before the servlet can respond then the browser simply throws > away it's end of the original TCP connection, thus you never see the > response from the first request. > > You could see both responses if you opened another window for the > second response. > > > Clearly there is a one to one mapping between a browser window and a > TCP connection. > > Therefore HTTP requests are always displayed in sequence, with the > last request you made being the one that is shown. > > > With HTTP/1.0 tcp connections are the same as HTTP connections, with > HTTP/1.1 there is an abstraction where many HTTP connections can share > a single TCP connection but the above still holds. > > > Nic Ferrier > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > > > -- David Mossakowski [EMAIL PROTECTED] Instinet Corporation 212.310.7275 ******************************************************************************* <<Disclaimer>> This message is intended only for the use of the Addressee and may contain information that is PRIVILEGED and/or CONFIDENTIAL or both. This email is intended only for the personal and confidential use of the recipient(s) named above. If the reader of this email is not an intended recipient, you have received this email in error and any review, dissemination, distribution or copying is strictly prohibited. If you have received this email in error, please notify the sender immediately by return mail and permanently deleting the copy you received. Thank you. ******************************************************************************* ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
