struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank Zammetti" <>
Subject RE: Action messages.
Date Thu, 03 Jun 2004 14:57:59 GMT
You can "fake it" and do this... have a hidden <span> in your page that, 
just before you submit your form, you display.  You will probably also want 
to wrap everything else in your page in a <span> and hide it at the same 
time.  I say this is "faking it" because the browser won't have any idea 
what's going on on the server, which might be OK.

If you want some sort of progress bar though, something that actually has 
knowledge of what's going on on the server, what you'll need to do is kick 
off a thread in your Action, and store some reference to it persistently 
(i.e., session or a database, etc.).  Then, you'll have to have a page on 
the browser with something like a meta-refresh that calls some special 
Action that can check the status of that thread, maybe get some sort of 
percent complete or something like that to display back to the browser.

Obviously, if faking it is good enough, as it usually is in these cases, 
that's by far the better choice.


>From: "Marcelo Epstein" <>
>Reply-To: "Struts Users Mailing List" <>
>To: "Struts Users Mailing List" <>
>Subject: Action messages.
>Date: Thu, 3 Jun 2004 11:46:44 -0300
>I have a Action that takes 10s to execute. Is there any way to display
>messages in the browser during execution?
>To unsubscribe, e-mail:
>For additional commands, e-mail:

MSN 9 Dial-up Internet Access fights spam and pop-ups  now 3 months FREE!

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message