This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JSP and the fly likes out.flush() question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "out.flush() question" Watch "out.flush() question" New topic

out.flush() question

Faisal Khan
Ranch Hand

Joined: Jun 29, 2003
Posts: 285
Lads and Gals,
I have written a quick and dirty (perhaps very dirty) JSP page for a buyer's guide. The page loads a form for user selection and there is an if statment to cheque if the form has been submitted, if so, very first two lines are:
out.print( "processing, please wait..." );
followed by the logic to access a class which performs all the quotations and display the cars witin the criteria specified.
For some reason the message "processing, please wait..." does not get displayed as soon as I hit "show cars" button, rather it displays after the processing of the page has finished, hence a blank screen for a few (or more) seconds.
Can someone help, the page is only for proof of concept as the management want to see a prototype of the tool.
Thanks in advance.

The secret to creativity is knowing how to hide your sources.
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 12759
You might try it with some markup <p>... </p> and a crlf so the browser will know how to display it.
Faisal Khan
Ranch Hand

Joined: Jun 29, 2003
Posts: 285
Thanks, but I already had it inside a <h3> tag and now tried with a <p> tag too but to no avail. Strange thing is, I have another page which does similar thing and it works on that but not here.
Don't get me started about those stupid light bulbs.
subject: out.flush() question
Similar Threads
Prevent loading until .jsp page is finished processing
Display please wait overlay(page should freeze) while the action is executing.
How to show message indicating server processing?
Dynamic page content using out.flush()
Busy indicator in HTML