aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Is it mandatory (request thread). Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Is it mandatory (request thread)." Watch "Is it mandatory (request thread)." New topic
Author

Is it mandatory (request thread).

Inocencio Oliveira
Greenhorn

Joined: Oct 13, 2005
Posts: 23
I read that the container creates for each request captured a thread. I know that one thread is generated to handle one Servlet instance, if you have ten started Servlets and all up, so you got one thread for each Servlet started, but for each request do you have addicional threads running?


<b>Keep your mind flowing away!</b>
Mateus Lucio
Ranch Hand

Joined: Jul 27, 2006
Posts: 57
Yes, assuming that you have 10 diferent servlets in your webapp then the container will create/allocate 1 thread per request, independently of what servlet will serve that request.


Studying ...
vani venkat
Ranch Hand

Joined: Nov 21, 2006
Posts: 142
how can we have many instances of single servlet in one JVM?


SCJP 1.4, SCWCD 1.5
Prasad Kumbhare
Greenhorn

Joined: Oct 18, 2007
Posts: 26
Vani,

To answer your questions, if servlet implements Single Thread Model then vendor can implement STM by creating multiple instances of servlet and make sure that every sevlet instance creates only one thread at a time.

Thanks.
Prasad


Thanks,
Prasad Kumbhare
SCJP 5.0, SCWCD 5.0, SCBCD 5.0
vani venkat
Ranch Hand

Joined: Nov 21, 2006
Posts: 142
ooh, got it. thanks prasad.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is it mandatory (request thread).
 
Similar Threads
Servlets and Threading
JSP & Servlet
instance pooling of servlet
Servlet of a JSP
How servlet process multiple request.