This question is two fold:
I have a servlet that accesses a database and thus under certain conditions an exception can occur. When such an exception occurs I would like to redirect to display an error page and then terminate the servlet... are there any special techniques for doing this or should I just write appropriate html tags/text to HttpResponse and "return"?
Assuming an exception is not generated a query can take a long time. As such I would like to display a page telling the user the the calculation is in progress that remains visible from the moment the query form is submitted until the calculation is complete and the results are ready to be sent to the client. The query results are actually an SVG file (mime:
image/svg+xml). The structure of the calls through the system are:
HTML query from --> [form data] --> QueryServlet --> Results
Is there some way I can display a working page and then when the QueryServlet is ready to send the results to the client, remove this page and begin sending the results?
Thanks in advance,
Originally posted by varun Khanna:
For "Please wait" ,alternatively, you can use the <div> element also !! I have used the <div> layer to show the user the desired message and the moment result was ready the new page refreshed the existing page with results.
can u plz explain it