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

How can we include static files in the jsp page?

0 Answers  


How to work with Chinese login page (internationalization).if he enters user name and password in chinese, how is it converted to English and validate in db? And in reverse it should display welcome message in Chinese,if user is valid

4 Answers   Bosch,


When servlet is loaded?

0 Answers  


What is servlet configuration?

0 Answers  


Can we write a constructor for a Servlet class ? if yes how ? if no why not ?

10 Answers  






What is HTTP Tunneling?

1 Answers   Wipro,


What is the difference between sendredirect() and forward() in a servlet?

0 Answers  


What do you mean by chaining in servlet?

0 Answers  


Explain the war file?

0 Answers  


how can we execute servelt? what the use ".war" or ".jar" file creation

3 Answers   CTS,


What do you mean by web applications? Explain web application directory arrangement?

0 Answers  


Explain the difference between get and post method in servlet?

0 Answers  


Categories