dcsimg
How can I be sure that the Servlet is sending a response to me?
0 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   ajay_luthria
Posted On:   Friday, March 15, 2002 07:20 AM

How do I know whether that server outputstream is sending me a response or not? I have opened the Client InputStream to recieve a response from a servlet,but how can i be sure that i will receive a response from the servlet? I cud be waiting for an hour expecting a response but may not receive one as the server may not send me any response at all Is there any way to check whether the servlet is sending me a response? The reason I am asking is this. I have written a Java Client that connects to a servlet.It has to wait for a response from the servlet.It will wait for 5 seconds and if this doesnt recieve a response,it will return back else it will display the re   More>>

How do I know whether that server outputstream is sending me a response or not?

I have opened the Client InputStream to recieve a response from a servlet,but how
can i be sure that i will receive a response from the servlet?

I cud be waiting for an hour
expecting a response but may not receive one as the server may not send me any response at all


Is there any way to check whether the servlet is sending me a response?


The reason I am asking is this.

I have written a Java Client that connects to a servlet.It has to wait for a
response from the servlet.It will wait for 5 seconds and if this doesnt recieve
a response,it will return back else it will display the response.


I have set a timer on my client for 5 seconds and a timer on the servlet for 15 seconds.

Essentially,when the client connects,the servlet response is held for 15 seconds
and the client tries for 5 seconds.
But the client is unable to exit without a response.The response comes back in 15 seconds.

The client shud have the message 'Connection Timed Out' after 5 seconds.

This means there is an error somewhere.

As the response takes 15 seconds,the client shudnt recieve one.


So,is there a way I can block the servlet response?

I am using threads and Inner classes for the timer purposes..
Please can any one help me?

ajay

   <<Less
About | Sitemap | Contact