| Author |
JSP page refresh
|
Trader Joey
Ranch Hand
Joined: May 11, 2000
Posts: 33
|
|
How can I ensure that a JSP page is displayed/refreshed only after the entire page has been evaluated. Here's whats happening: 1. The JSP evaluates code snippets and starts displaying them. Its displays an html form and a submit button. 2. Midway through the page is a backend query that takes a significant amount of time to evaluate. 3. The results of the backend query are evaluated and the page is displayed completely. However, while step 2 is still executing.... if the user clicks on the submit button that was already displayed on the page, we get unanticipated results. Is it possible to instruct the JSP page with some HTML headers to wait for the complete page to be evaluated before the page is displayed. Thanks for your help in advance. Nikhil
|
 |
jyothsna kumari
Ranch Hand
Joined: Jul 21, 2003
Posts: 108
|
|
hai, i think u can do either way. 1.u can disable the submit button till the query executes.once the execution is completed then enable the button so that u can prevent the user to click 2.u can set a session variable after the completion of the process.on page load u can call a function which checks for the session variable.if it is not set then wait without loading and if set, then continue load the page. hope this may help u jyothsna
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56191
|
|
Or you can perform the lengthy processing in a servlet before forwarding along to the JSP at all (a la Model 2). And now, Nikhil Nikhil, with over 30 posts on the Ranch, you must be aware by now that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it. Thanks! bear JSP Fourm Bartender
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
 |
|
|
subject: JSP page refresh
|
|
|