I have an html page which is used to submit data into a jsp page. This jsp page invokes a bean, which may take a lot of time to execute. I need to show an intermediate page which says "executing bean", while the bean is being executed. How can I do this?

Will Glass-Husain

In a recent project, I did the following:

* file entry.jsp contains a form. The form accepts user input and contains two hidden fields "nextURLDelay" (value 5) and "nextURL" (value "finish.jsp"). Upon submit, goes to page "wait.jsp".

* file wait.jsp processes form contents and displays "calculating..." animated GIF. The file contains a refresh meta tag. After waiting 5 seconds, the file goes to the URL "finish.jsp".

<META HTTP-EQUIV="Refresh" CONTENT="<%=request.getParameter("nextURLDelay") %>; url=<%=request.getParameter("nextURL") %>">

* third file, with name "finish.jsp".

An alternate method would be to use a request.sendRedirect method from the Jsp code of the second page.