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 used to display the intermediate result in an interceptor?

503


What is structs 2 validation framework?

566


What is the purpose of @key annotation annotation?

600


How tag libraries are defined in Struts?

574


When it’s useful to use IncludeAction?

551






What do you mean by actionform?

581


What is a custom tag?

545


What is the differences between struts1 and struts2?

532


What is the purpose of @stringlengthfieldvalidator annotation?

603


What is controller in struts2?

502


Which library is provided by struts for form elements like check boxes, text boxes etc?

508


How do struts work?

524


Give an example where struts tiles may be used?

555


Are actions thread safe?

540


How is the action mapping specified?

553