Send the browser a response.sendRedirect(newURL) and then start your java mail stuff. User sees a page that says "Work in progress" and doesn't have to wait for your servlet to finish.
Jeff -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]] On Behalf Of Richard Johnstone Sent: Wednesday, December 04, 2002 9:18 AM To: [EMAIL PROTECTED] Subject: Javamail from a servlet Hi I am currently sending a mail from within a servlet. The problem is that it "hangs" the page for ages as it churns away sending the mail. Is there anyway to execute a method in the background, so effectively it calls something which churns away but control is returned back to the servlet straight away? Ta Rich ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html