what is the difference between ServletContext and
ServletConfig?
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / sunil kumar- vizag
Servlet Context: Servlet Context defines a set of methods
that a servlet uses to communicate with its servlet container.
Servlet Config: A servlet configuration object used by a
servlet container passes information to a servlet during
initialization.
| Is This Answer Correct ? | 7 Yes | 2 No |
Answer / raghu
Servlet Context -> It is one for the web application.
Servlet Config -> It is one for the Servlet.
| Is This Answer Correct ? | 5 Yes | 1 No |
Answer / durairaj
ServletContext represents the unique configuration of particular webapplication in the WebContainer.The parameters set in the ServletContext can be retrieved universally in the particular webapplication
ServletConfig represents the unique configuration of a particular Servlet in the Webapplication.The parameters set in the ServletConfig can be retrieved universally in the particular Servlet class only(not outside)
| Is This Answer Correct ? | 2 Yes | 1 No |
How exceptions are handled in struts application?
What is the difference between empty default namespace and root namespace?
what are java stuts? what are there uses
2 Answers Rupa, Tech Mahindra,
What are action errors and error and what are the consequences they impose?
How Struts internally works? For Example if we type the URL "/login.do" how the process goes internaly? How the struts-config.xml loaded?
Where can i get jar file for use the struts-tags in struts2?
What is struts? Explain
What is the DynaActionForm? How we implement the dynaactionform ? can u please tell me the way to implement? in understandable way?
How exception handling is provided in struts?
what is frame work in struts?
kindly can any one post for me portlet,hibernate,spring example code and configuration,and some related tutorials plz its urgent for me....thanks in advance ............
What is the significance of logic tags in Struts?