What is ServletContext() and what is its use?

Answer Posted / a,srinivas rao

servletcontext is an object which contains the information
regarding all the servlets that are used in web application.
when ever user first do the deployment of the web
application on the server the web container instantiate a
servlet context object.the information in the servlet
context object is also passed to init method.

Is This Answer Correct ?    51 Yes 20 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the life-cycle methods for a servlet?

527


What is the difference between genericservlet and httpservlet

558


How do I use cookies to store session state on the client?

512


What is meant by session? Tell me something about httpsession class?

582


What is the need of servlet filters?

522






Who is responsible for writing a constructor?

757


What is servletconfig?

532


What methodology can be followed to store more number of objects in a remote server?

1802


How to get the server information in a servlet?

660


What is difference between cookies and httpsession?

522


What do you mean by httpservlet?

542


Explain web container.

551


How can we refresh automatically when new data has entered the database?

599


What is a deployment descriptor?

574


Why jsp is better than servlet?

515