This is a very naive solution that could work. Here goes ...
Suppose you have a 2 page web application. The 1st page is a normal html page containing a form and the other page is generated dynamically by JSP (page2.jsp)
Thus, to create a delay, introduce a new JSP/Servlet generated page, that does nothing but, stores the results in the session and starts off the processing in a
Thread, generates a unique ID for this request (session ID should be fine) and returns including a
Thus, the splash page is displayed for 10 seconds in the above case and then the browser makes another request to the jsp page, page2.jsp with the CODE.
In the jsp page, check if the Thread has completed processing (you need a server side communication mechanism for this which is described later)
If so, get the data and do the needful.
If not, Wait till the data is ready (synchronization). Thus, the browser will be still showing the splash while trying to connect to the new page.
Server Side Communication As you will be spawning threads to do the work, you need to provide a means for the Threads to communicate completion of work. There are various ways you can do that. The simplest way is a Message Board, where each thread has its own space.
When the server hands work to the thread, put a mark in the thread's space (say FALSE).
When the worker finishes the work, it erases the mark in its space (TRUE) and so on...
Disadvantages : I know there could be a lot of threads spawned at the server side that would affect server performance. But, if the expected server load is not too high, a thread pool could be used.
I hope this helps.
Ashwin.
[This message has been edited by Ashwin Desai (edited March 20, 2001).]