This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Little Book of Impediments (e-book only) and have Tom Perry on-line!
See this thread for details.
Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt from HFSJ chap.5 mock exam

 
Abhishek Mantri
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Q.no.13:which statements accurately describe how many instances of servlet the servlet container instantiates for each web application?(choose all that apply)
Ans:
A.If the servlet implements javax.servlet.SingleThreadModel,the container may create one instance for each request.
B.If the servlet does not implement SingleThreadModel,the container may create multiple instances of the servlet in same JVM.
C.The<load-on-startup> web.xml element can determine how many instances are created.
D.If the servlet does not implement SingleThreadModel, the container will create no more than one instance per JVM.

Correct answer is A,D
I couldn't get why 'A' is correct,since there is always single instance of a servlet existing and not one per request.Please help !
 
Marc Peabody
pie sneak
Sheriff
Posts: 4727
Mac Ruby VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
SingleThreadModel
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic