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

M

Madni

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
 
Z

zero

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?
 
M

Madni

Dear Zero,

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top