what is servlet context?why its used?in what situation we should use it in our program?
ServletContext is an interface that is defined in the javax.servlet package. It describes a set of methods for communicating with the servlet container. For example, dispatch requests, to get the MIME type of a file, or write to a log file.
Each web application has only one ServletContext, which is accessible to all the active resources of that application. The ServletContext can also be used by the servlets to share the data with one to another.
For more information, visit the following links: