This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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
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
Or you can perform the lengthy processing in a servletbefore 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