struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: Struts Submission
Date Wed, 11 Apr 2007 22:33:43 GMT
Chetan Pandey wrote:
> Hi All:
> I have a list of Checkboxes with UserIDs.
> User checks a few number of Check-boxes and then clicks 'SUBMIT'.
> All Checked Items received are then added to a DB - which happens in a
> fraction of a Second.
> However, all of the UserIds are also sent an Email which takes a very long
> Time.
> Therefore, the User is forced to wait.
> Is their a WAY I can only do the DBInsertion on click of Submit Button and
> do email Sending in the back-ground whilst the User stares at a JSP saying:
> All Users selected have been registered.
> Currently Email Transmission is being processed. Pls WAIT and donot click
> I don't see how using regular Struts 1.2 I can fwd to a page but do work in
> the Background.
> Any Ideas or Improvements to this Idea.

First, I would suggest that you make the sending of emails an 
asynchronous process, and don't ask the user to wait for it to complete. 
Just put the emails in a delivery queue and use a separate daemon thread 
to monitor the queue and deliver the email in the background.

If you really need to make the user wait until the emails have been 
sent, you can do that. You'll still need to launch a separate thread to 
do the work so the main thread can return a 'please wait...' response 
straight away.

There's relevant documentation on the wiki here:


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

View raw message