
what is servlet context?why its used?in what situation we should use it in our program?

Hi Friend,
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:
http://www.roseindia.net/servlets/ServletContext.shtml
http://www.roseindia.net/tutorial/servlet/getContextParameters.html
Thanks
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.