What is the ServletConfig object, and why is it useful?

Troy Niven

The ServletConfig object is an interface. It contains the methods

You can use the methods to determine the Servlet's initialization parameters, the name of the servlets instance, and a reference to the Servlet Context the servlet is running in.

getServletContext is the most valuable method, as it allows you to share information accross an application (context).

There is more information in the Javadoc documentation that is provided.

See also http://www.jguru.com/jguru/faq/view.jsp?EID=35085 and http://www.jguru.com/jguru/faq/view.jsp?EID=208612
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.