why don't you send a message to the servlet when you close the client, so the server can stop listening on that port...? > I have a Servlet named MyServlet. The MyServlet keeps running on my > server all the time. When my client sends a request via a > doPost request > the servlet forwards the request to my server. Subsequently my client > sends a doGet request. After this in the servlet i register > a listener > and keep waiting to get the responses from my server for the previous > requests and write it to the client when i receive them. > > When i close my client application, in the servlet the doGet > still waits > in the infinite loop for getting the responses. Can i in > anyway specify > the servlet about the non-availability of the client. > > Suppose if i start my client again and repeat the process(this time I > unregister the previously registered listeners), i get a IO > Exception at > output stream's write() method. This i believe is due to the fact that > the infinite loop which i started for the previous client request is > still alive. > > Is there anyway to resolve this issue. Or is there anyway in > Tomcat that > i reload the servlet everytime the client sends a request. > > Anyhelp in this regard is highly appreciated. > > with regards > Sriram.R > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
