wood burning stoves 2.0*
The moose likes JSP and the fly likes Display Animation While Processing 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 "Display Animation While Processing" Watch "Display Animation While Processing" New topic
Author

Display Animation While Processing

Winston Smith
Ranch Hand

Joined: Jun 06, 2003
Posts: 136
Hi All,
Suppose I have a login situation, where the user enters a username/password on a login screen, clicks submit, and the request is forwarded to a JSP for processing. Now, while the user waits, an animated gif is displayed, letting the user know the request is processing (I'm sure you've all seen these). When processing is complete, the user is forwarded to the proper page automatically. I've done this before, but I'm not sure how it works. Basically, once the user submits the login info, it is forwarded to authenticate.jsp. On this page, I've put some simple HTML, which includes the animated gif, and a sendRedirect() based on the authentication results. Now, my question is, when the request gets to the server, does the server interpret the HTML and send it back, while simultaneously executing the java code in the JSP. In other words, when the server receives a request for a JSP, does it send the response in a piecemeal fashion, sending data as it is interpreted, like normal HTML, or does it process the java code first, then start sending back data? I imagine it must be the second, since the java code can be embedded all over the HTML.
Thanks,
WS
[ April 01, 2004: Message edited by: Winston Smith ]

for (int i = today; i < endOfTime; i++) { code(); }
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Display Animation While Processing
 
Similar Threads
Long running request returns no HTTP response
response.redirect and jsp:forward
How to put loading... when page is loading?
When to use a JSP page?
Bean is null in an XMLHttpRequest (at first)