what is the difference between ServletContext and
ServletConfig?

Answer Posted / devarathnam chinnakotla. banga

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.

Is This Answer Correct ?    8 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of @beforeresult annotation?

578


What is the difference between session scope and request scope when saving formbean ?

558


What are different Struts2 tags? How can we use them?

574


Why are frameworks used?

536


Which class is the Front Controller in Struts2?

547






What are the benefits of Interceptors in Struts2?

655


What is the purpose of @before annotation?

589


What is the purpose of @before?

556


Can you explain struts.properties in struts2?

532


What is the purpose of form-beans tag in struct-config.xml?

553


What is the purpose of @conversion?

607


What is life cycle of an interceptor?

550


How is token generated?

538


What is dispatch action class?

615


What is action class?

583