Re: JSP Loading Page... Please wait while my code doesn't work!
- From: angrybaldguy@xxxxxxxxx
- Date: 31 May 2007 10:29:59 -0700
On May 30, 11:46 pm, Nino <nino9st...@xxxxxxxxx> wrote:
(snip "please wait"-style page)
And that's it!!! Well, I tried this and it doesn't work. Is there
anything I'm missing? Does it matter what engine renders my JSPs
(Tomcat)? Does it matter what kind of work is being done? The type of
HTML that is built into the waiting DIV tag (for example, can I use
table tags?)?
JSPs are completely[1] evaluated by the server into an internal buffer
and then sent to the browser all at once. Even if it weren't, you'd
want to call out.flush (); after your waitPage div had been output but
before the loadPage div was sent.
I actually ran some more tests, and out.flush(); did nothing. It never
ended up sending anything out. I tried switching around the visibility
of the layers to no avail. Once the JSP starts doing work, the browser
just spins until it's done and then advances. No waiting screen, not
out.flush();, nothing. Any other ideas? Any reason why out.flush()
might not be working?
You need to read and understand both sentences in my post. The JSP
container, by default, isn't sending anything to the browser at all
until it finishes evaluating the page. You may be able to change that
behaviour -- you'll need to read the container documentation (eg., for
Tomcat you'd have to read the Tomcat docs) to find out how, since it's
not covered by the Servlet spec.
As long as the servlet container is buffering the page, adding flushes
to the output generation will not help you.
.
- References:
- Prev by Date: Re: Understanding class access
- Next by Date: Re: buggy regexp
- Previous by thread: Re: JSP Loading Page... Please wait while my code doesn't work!
- Next by thread: lightweight soap calls
- Index(es):
Relevant Pages
|