wood burning stoves 2.0*
The moose likes Servlets and the fly likes Is it multiple threads problem? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Is it multiple threads problem?" Watch "Is it multiple threads problem?" New topic
Author

Is it multiple threads problem?

Yurong Chen
Greenhorn

Joined: Jul 23, 2002
Posts: 18
Hello,
I am a new beginner here. I am doing a small project about web server design. I meet a problem now.
In one step of my project, after the client submitting request, the server should do two things: one is send the main page back to the client, the other is invoking a algorithm to process the request and send the result to client by email. Is it a multiple threads problem? Should I use java servlet to solve the problem? I only use JSP in my project. Can I use JSP to solve the problem? If Java servlet is the only choice, could you give me some advice to do? I really don't know how to begin?? Thank you in advance!
Yurong Chen
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
When I have done this sort of thing, it is with a separate object having its own Thread that does nothing but send mails. The reason being that your mail process will have to deal with a mail server that may be busy or off line so you can't count on the mail job finishing in a reasonable time for sending a response back to the user.
Your servlet or JSP just hands off the mail information to the separate object.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it multiple threads problem?
 
Similar Threads
Connection Pool WITHOUT Jdbc, with Jsp/Servlet/Java
IBM HttpServer and websphere Appserver
Forward Socket to another server socket
Server approach - I think I might be missing something
What's the best way to handle multiple Java bean instance in Jsp?