Hi, Does anyone knows how to delay a response for a request made to a servlet? Client browsers make a request to a servlet on a web server, and the response from the server should be delayed until the server get some external notification event. Any suggessions! Thanks -hm
~hm
Andrew Shafer
Ranch Hand
Joined: Jan 19, 2001
Posts: 338
posted
0
What is the time frame on the delay? What mechanism would be reporting to the servlet?
A project I'm working on uses Runtime.getRuntime().exec() to create a Process that requests some calculations. Process.waitFor() is a method that ensures the process is finished. Maybe this will give you some ideas. Please give more specific detail about what you want to do exactly.
!_I_Know_Kung_Fu_!
Hema Menon
Ranch Hand
Joined: Oct 29, 2000
Posts: 569
posted
0
Hi Andrew, I am working on an idea, where some client browser would connect to a web server(may be a servlet application, somewhat like a login process and say, hi I am ready). The webserver will be notified by an external application(again may be by a servlet request)when some data is collected( Somewhat like collecting information from a database). When the server get this notification, it should pop up a response on to the client browsers with this data. The options I have is - Client would poll the server to see if the server has the data. But this is not a recommended solution. The better option is to poll but at a greater timeout, or the server delay the response of the client request until it receives the data. Any suggestions welcome. Thanks -hm