Re: JSP Loading Page... Please wait while my code doesn't work!



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.

.



Relevant Pages

  • Re: welches System =?UTF-8?B?ZsO8ciBlaW5lbiBTaG9wID8=?=
    ... Tomcat oder einem anderen Servlet Container völlig aus. ... Kannich denn den Tomcat oder einen Anderen auch neben Apache installieren? ...
    (de.comp.lang.java)
  • Re: Web Applikation mit Tomcat
    ... Ich habe auch das eclipse Tomcat Plugin installiert, ... Diese JSP werden dann unter der Haube zu Servlets kompiliert. ... Alternative dazu waere die Verwendung einer klassischen Template-Engine ... jedem Fall die in der View enthaltene Logik minimieren. ...
    (de.comp.lang.java)
  • error using JSP, Javabeans, and Tomcat
    ... I'm having difficult getting JSP to work with Javabeans inside Tomcat. ... Generated servlet error: ... dbConnect cannot be resolved to a type ...
    (comp.lang.java.programmer)
  • Re: From Java + Tomcat + JSP -> C# + ASP.NET
    ... different to Tomcat, you'll need to run with it to learn its quirks and JSP ... understanding the .NET framework and ASP.NET as part of that framework, ... time other experienced java people spent to come up to speed with .NET ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Servlets, Threads & Co.
    ... Werden diese Methoden von Tomcat nur von einen Thread aufgerufen oder muss man hier auf die Synchron. ... Gilt die Antwort nur für Servlets oder ist bei JSP und bei der Tag-lib das gleiche zu beachten? ... Eine JSP ist nach dem kompilieren beim ausführen sowieso eigentlich ein Servlet, also unterliegt es den selben Regeln. ...
    (de.comp.lang.java)