Is multiple correspondance possible between client(html & JS) and servlet ?

  • Follow


Hi all,

This question might seem wiered to the "gurus" ... but the thing is I
am new to servlet programming and my servlet will perform different
task ... and it is necessary for client to aware of the current task
the servlet is performing at the moment ...now suppose in the middle of
the servlet execution ...it sends back some critical information to the
client ..then will it be possible for servlet to start from the point
where it discontinued ...If any one can give me some sugggestion over
this i will be highly obliged ...

Regards ,

Madni

0
Reply omermadni (22) 11/23/2005 6:35:57 AM

"Madni" <omermadni@gmail.com> wrote in news:1132727757.838559.6310
@g44g2000cwa.googlegroups.com:

> Hi all,
> 
> This question might seem wiered to the "gurus" ... but the thing is I
> am new to servlet programming and my servlet will perform different
> task ... and it is necessary for client to aware of the current task
> the servlet is performing at the moment ...now suppose in the middle of
> the servlet execution ...it sends back some critical information to the
> client ..then will it be possible for servlet to start from the point
> where it discontinued ...If any one can give me some sugggestion over
> this i will be highly obliged ...
> 
> Regards ,
> 
> Madni
> 
> 

A servlet gives data in response to a request from the client, it can't 
send data on its own.  There is no open connection, so where would it send 
this data?  Perhaps you could use a scheme like this:

1. client requests data
2. servlet starts calculations in a separate thread
3. servlet's original thread replies with a "please wait" page, which 
includes scripting (javascript, vbscript, ...) that will reload the page 
after n seconds
4. client reloads the page (ie, sends another request)
5. server checks if the separate thread is ready.  If so, send the data.  
If not, send the "please wait" page again, and we're back at 3.

Does that solve your problem?
0
Reply zero15 (423) 11/23/2005 12:34:51 PM


Dear Zero,

Thanks a lot for your suggestion i am very hopefull this gonna solve
the problem ....thanks again .

0
Reply omermadni (22) 11/23/2005 12:40:17 PM

"Madni" <omermadni@gmail.com> wrote in news:1132749617.924212.10390
@g43g2000cwa.googlegroups.com:

> Dear Zero,
> 
> Thanks a lot for your suggestion i am very hopefull this gonna solve
> the problem ....thanks again .
> 

My pleasure :-)
0
Reply zero15 (423) 11/23/2005 4:29:11 PM

3 Replies
17 Views

(page loaded in 5.377 seconds)

Similiar Articles:




7/15/2012 2:16:56 AM


Reply: