Diffrences between Servlet config and servlet context, MCS-051, June 2009, 5a(i)

Servlet context Servlet config
It is an Object to be shared by all servlets and JSPs. this object is associated to specific servlet
unlimited store of data as per as server capability limited support for data handling
can be used to collaboration between multiple servlet. It is for single servlet
Data stored here can be access from any servlet and JSP Data stored here can be access from the servlet for which this object is associated
It is created using getServletContext() method of Servlet class Created using getServletConfig() method
Only Single instance available within web application Multiple instances for each servlet.
contains global properties like classpath, context path etc Only contains property related to specific servlet.

No comments:

Popular Posts