Question { 10351 }
what is the difference between ServletContext and
ServletConfig?
Answer
Hi,
ServletContext: ServletContext is a view of webapplication,
there will be only one servletcontext for one
webapplication. It acts as shared memoty area, all the
components of a webapplication can access the data from
servletcontext object.
ServletConfig: ServletConfig will be specific to each
servlet. If your webapplication contains 20 servlets then,
there will be 20 servletsconfig objects.