GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 449 of 493    Print  
Servlets are multi threaded by default. If there are concurrent requests to the same servlet the servlet container generates another instance of the servlet . Is this the reason y servelts are multi threaded by default?? Is there any way the multi threaded feature can be achieved ?

  
Total Answers and Comments: 4 Last Update: May 21, 2008     Asked by: aneesm 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: vinaymudgil007
 
one thing surely i can say and that is "only one insatnce of the servelet would be created" and multiple threads would be used to serve the request.......
well if the requests are very large in number then the container might kill/suspend some  threads and that would be dependent on the servlet container you are using..... but not more than once instance per servlet


Above answer was rated as good by the following members:
preetiak_khera
November 19, 2007 07:12:00   #1  
Vignesh        

RE: Servlets are multi threaded by default. If there a...

I dont think  muti threading is  impliying in Servlet Container. Servlet is based on the client request. Virtually like muti thread and servlet acting same. but the context passing with Servlet is entirly different.

 
Is this answer useful? Yes | No
December 02, 2007 00:53:06   #2  
bhaskarrao Member Since: November 2007   Contribution: 2    

RE: Servlets are multi threaded by default. If there are concurrent requests to the same servlet the servlet container generates another instance of the servlet . Is this the reason y servelts are multi threaded by default?? Is there any way the multi thr
If there are concurrent requests to the same servlet, the servlet container creates a new thread. It does'nt create another instance.
It creates a new instance if any servlet alias is there or if instance pooling option is there.

 
Is this answer useful? Yes | No
April 29, 2008 23:19:49   #3  
AjayMukiri Member Since: April 2008   Contribution: 4    

RE: Servlets are multi threaded by default. If there are concurrent requests to the same servlet the servlet container generates another instance of the servlet . Is this the reason y servelts are multi threaded by default?? Is there any way the multi thr
Servlets are multi threaded by default. If there are concurrent requests to the same servlet the servlet container generates New Thread . So this the reason servelts are multi threaded by default.
 
Is this answer useful? Yes | No
May 21, 2008 09:57:01   #4  
vinaymudgil007 Member Since: May 2008   Contribution: 39    

RE: Servlets are multi threaded by default. If there are concurrent requests to the same servlet the servlet container generates another instance of the servlet . Is this the reason y servelts are multi threaded by default?? Is there any way the multi thr
one thing surely i can say and that is "only one insatnce of the servelet would be created" and multiple threads would be used to serve the request.......
well if the requests are very large in number then the container might kill/suspend some  threads and that would be dependent on the servlet container you are using..... but not more than once instance per servlet

 
Is this answer useful? Yes | NoAnswer is useful 1   Answer is not useful 0Overall Rating: +1    


 
Go To Top


 Sponsored Links

 




About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape