can we create more than ServletContext and ServletConfig in
your application

Answers were Sorted based on User's Feedback



can we create more than ServletContext and ServletConfig in your application..

Answer / narendhersharma

ServletContext which is managed by webcontainer, For the
whole web application only one servletcontext will be
there...

In ServletConfig , this is also managed by webcontainer,
for every request object one servletconfig object will be
there..

Is This Answer Correct ?    19 Yes 4 No

can we create more than ServletContext and ServletConfig in your application..

Answer / sunstar

Servlet Context is used per Web apllication so we can't use
more than one Context,Servlet Config is per servlet or per
Jsp so you can use the more than one Config.....:-)

Is This Answer Correct ?    10 Yes 0 No

can we create more than ServletContext and ServletConfig in your application..

Answer / naresh

We can not have more than one servletContext in a web
application, but we can have more than one servletConfig
provided there is more than one servlet in the web
application...

Is This Answer Correct ?    10 Yes 0 No

can we create more than ServletContext and ServletConfig in your application..

Answer / ravi ranjan kumar rajnish

No, In case of ServletContext Bcoz there is one
ServletContext is for one for whole application.
But yes in case of ServletConfig, bcoz servletconfig is
servlet specific so it can more than one

Is This Answer Correct ?    9 Yes 4 No

can we create more than ServletContext and ServletConfig in your application..

Answer / vishal kumar

yes we can create more than one servletcontext for an
application.in case of distributed application,
application's part are deployed on different application
server so in this case every part of application has
different servlet context.so as a whole application consist
many servlet contect.

Is This Answer Correct ?    3 Yes 2 No

can we create more than ServletContext and ServletConfig in your application..

Answer / ravikiran.chd

no one servlet context per web application we can generate
multiple servlet config objects

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More Servlets Interview Questions

Why do we have servlet filters?

0 Answers  


I Have A Plan to develop a Project in Struts,I want the template of struts project with Hibernate.Canany body provide me the required information?

0 Answers   IBM,


What is difference between Forward() and sendRedirect() methode?

14 Answers   Polaris,


difference between request.getSession(false) or request.getSession() and request.getSession(true)

2 Answers  


What is URL Encoding?

0 Answers  






What is the difference between the include() and forward() methods?

0 Answers  


What are the uses of servlet

0 Answers  


What is Difference between JavaBeans and taglib directives?

3 Answers  


Differentiate between get and post?

0 Answers  


When using servlets to build the HTML, you build a DOCTYPE line, why do you do that?

0 Answers  


What is the capacity the doget can send to the server?

0 Answers  


Hi Frieds, I am new to servlet why to use servlet in webapplication. what i know is " use servlet as a controller in mvc and to implemnent business logic . is it correct ? One more thing reason for implementing business logic with servlets , why not jsp.

4 Answers  


Categories