wood burning stoves 2.0*
The moose likes JSP and the fly likes JSP page refresh Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "JSP page refresh" Watch "JSP page refresh" New topic
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: 60782
    
  65

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


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP page refresh
 
Similar Threads
regarding radio buton selection
submit form problem
Enable/disable buttons - File download(CSV)
Enable/disable buttons
Doubt on target=_BLANK