Win a copy of Fixing your Scrum this week in the Agile forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Rob Spoor
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Junilu Lacar
  • Tim Cooke
Saloon Keepers:
  • Tim Holloway
  • Piet Souris
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Frits Walraven
  • Himai Minh

Is it multiple threads problem?

 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 want my playground back. Here, I'll give you this tiny ad for it:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic