File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Handling Multiple threading in servlet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Handling Multiple threading in servlet" Watch "Handling Multiple threading in servlet" New topic

Handling Multiple threading in servlet

Brijesh shah
Ranch Hand

Joined: Mar 16, 2007
Posts: 92

Can anybody please explain me by conceptually how to handle multiple threading in servlet...

Thanking you.

Best Regards;
Brijesh Shah
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 802

Hi Brijesh,
Each incomming request to server in turn converted into separate executing thread for a respective single servlet instance.
What you want to do using multiple threading in servlet?

SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
Adwin Lorance

Joined: May 31, 2010
Posts: 9
True .. As Ninad says , Container is responsible to create Threads and give each request to a new Thread. Or else pick from a pool of servlet instances and let it handle a request.

What did you want to do in a multi threaded environment ?
I agree. Here's the link:
subject: Handling Multiple threading in servlet
It's not a secret anymore!