How about this:

The dispatch servlet starts the db query in its own thread seperate thread,
and immediately dispatches the request to a "Please wait..." page.

The wait page contains a <META> tag to make the client refresh after 10
seconds or so.

When the dispatch servlet gets the refresh request it checks to see if the
query is complete.  If not, it dispatches the request to the wait page
again, otherwise it dispatches it to the results page.

You could enhance this by providing a cancel button on the wait page.

Dunno how well this fits Model-2, though.

Chris Walker
Brainbench MVP for ASP
http://www.brainbench.com



> -----Original Message-----
> From: Anil Malladi [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, November 21, 2000 3:34 PM
> To: [EMAIL PROTECTED]
> Subject: How to show "Req being Processed" pg when db access is slow?
>
>
> Hello All,
>
>    We are using MVC Model-2. Web page posts request to
> Servlet. Servlet dispatches the request to JSP and
> instantiates a Bean. Bean is taking a considerable
> amount of time to generate the report because the
> stored procedure is slow (couldn't be optimized any
> more!). The idea is to show a temporary page saying
> "Your request is being processed" until the Bean is
> ready with data being fetched from stored procedure.
> If it is achievable while using MVC model-2 approach,
> what are the possible ways of doing this ?
>
> Thanks in advance,
>
> - Anil
>
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Thousands of Stores. Millions of Products.
> http://shopping.yahoo.com/
>
> ==============================================================
> =============
> To unsubscribe: mailto [EMAIL PROTECTED] with body:
> "signoff JSP-INTEREST".
> For digest: mailto [EMAIL PROTECTED] with body: "set
> JSP-INTEREST DIGEST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to