Is it possible to return to page and send mail asynchonous

Hi,

In my webapp I post a registration form to a servlet from my first jsp page. The servlet then sends an email to the user and forwards the user to the second jsp page.

Without sending the email the user is transferred from the first jsp page to the second jsp page in less than a tenth of a second. almost instantly.

If I do send the email the user sees the browser loading for 4 to 5 seconds and is then forwarded to the next jsp page. Is it possible to send the email asynchronous so the user is forwarded immediately and the email is being send in het background without the user having to wait for it?

Thanks

[646 byte] By [jposthuma] at [2007-11-27 11:41:18]
# 1

Create a thread and send the email in the thread. Of course, you'll

have to find some other way to notify the user if the email fails.

bshannona at 2007-7-29 17:37:20 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...