What is ServletContext() and what is its use?

Answer Posted / shiva

One Servlet Context object will be created by the container
for one webapplication. That means all servlets can have a
scope to acess that context object. for example, let us
assume there 5 servlets are there in u r web application,
if u want to share same data to all servlets then we can
share that data using servlet context, because every
servlet can have interaction with that application
environment...

Is This Answer Correct ?    182 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by Servlet? What are the parameters of service method?

604


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

1823


explain the advantages of servlet life cycle?

562


What are the different session tracking techniques?

685


What is servlet invoker?

602






How the servlet is loaded?

604


When is the servlet instance created in the life cycle of servlet? What is the importance of configuring a servlet?

580


What is java servlet?

616


What is difference between cookies and httpsession?

550


Which interface must be implemented by all servlets?

801


What is the use of request dispatcher interface?

571


Explain the lifecycle of a servlet?

513


What is servlet configuration?

532


What is servlet and how it works?

508


Why servlet is used as controller ? Not JSP? I want complete explation?

661