what is the difference between ServletContext and
ServletConfig

Answer Posted / balu

yes ur correct Saurabh..

servletcontext scope is of total application..where as
servletconfig is only for the servlet....

servletcontext gets created when the server starts i.e when
the server reads the web.xml of the application which is
being deployed in the server...
where as servletconfig get created when the servletobject
gets created...

Is This Answer Correct ?    6 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Is servlet thread safe?

540


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

590


What are the uses of servlets?

626


Difference between java beans & servlets?

597


How can the session in servlet can be destroyed?

723






What is lazy loading and what is Generic Servlet Class?

617


How to commuincate between an applet and a servlet?

600


How httpservlet is different from the genericservlet?

576


request parameter how to find whether a parameter exists in the request object?

585


What is the difference between portlet and servlet?

521


What do you mean by annotations in servlet?

595


What do you mean by cgi?

536


What is the life-cycle of servlets?

645


Define the servlet mapping.

554


What is difference between cookies and httpsession?

554