How many ServletConfig and servlet context objects are present in one application?

Questions by satyasudheer   answers by satyasudheer

Showing Answers 1 - 5 of 5 Answers

shyamalatha

  • Sep 21st, 2005
 

only one servlet confgn object and servlet context object are used.

  Was this answer useful?  Yes

Mukul Patil

  • Oct 2nd, 2005
 

There is one ServletConfig object per servlet. So if there are 10 servlets in an application, there would be 10 ServletConfig objects.

 And there is only one ServletContext object per aplication.

Devidas Sonawane

  • Oct 24th, 2005
 

ServletConfig object is for every servlet but ServletContext object is only one for One Application. Plz... note

  Was this answer useful?  Yes

javamatrix

  • Nov 9th, 2005
 

i wud like to clarify shyamalatha point.....there is only one servlet context for an entire application where as for every servlet, there is a servlet config object....Using the servlet context, a servlet can view the environment in which it is running .....use the context to store global values...where as using servlet config....it can initialise itself...

  Was this answer useful?  Yes

Debasish Dutta Roy

  • Jan 16th, 2006
 

The answers above are not fully correct. The correct answer is1. There is a servlet config per servlet in an application. (Almost, all got this right)2. There is one ServletContext, per application and per jvm. Per jvm is the missing piece. Its about the same app running in multiple jvms

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions