You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Chetan Pandey <cp...@bluesingapore.com> on 2007/04/11 15:17:03 UTC

Struts Submission

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
the BACK BUTTON.

 

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.

 

Thanks.

 

Chetan

 

_____________________________________________________________________
CHETAN PANDEY  Executive - Technology Services
BLUE, 1 Maritime Square, #13-02 Harbourfront Centre, Singapore 099253 
DID +65-6212-0863 main line +65-6333-3336 fax +65 6336-6334
email  <ma...@BLUEsingapore.com> cpandey@BLUEsingapore.com website
<http://www.bluesingapore.com/> www.BLUEsingapore.com
_____________________________________________________________________
BEIJING      SHANGHAI       LONDON     TOKYO      PALO ALTO      SINGAPORE

CONFIDENTIALITY STATEMENT: This email and its attachment(s) contain
Privileged/Confidential information. If you are not the intended recipient,
the distribution, use or replication of the information in this email is
strictly prohibited. If you have received this email in error, please notify
the sender immediately by return email, then delete this email and any
attached documents. Any opinions, conclusions or views expressed in this
email are those of the individual sender, except where he/she -- expressly
and with authority  -- states them to be the views of BLUE.

 


Re: Struts Submission

Posted by Laurie Harper <la...@holoweb.net>.
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
> the BACK BUTTON.
> 
> 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:

http://wiki.apache.org/struts/StrutsPleaseWait

L.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org