Thursday, October 27, 2005

ServletConfig: A servlet configuration object is used by a servlet container to pass information to a servlet during initialization. Using config object you can access init parameters declared in deployment descriptor and get context object.

ServletContext: Defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file.

There is only one context per "web application" per Java Virtual Machine.

The ServletContext object is contained within the ServletConfig object, which the Web server provides the servlet when the servlet is initialized.

0 Comments:

Post a Comment

<< Home