>From the API:

ServletConfig is a servlet configuration object used by a servlet container
to pass information to a servlet during initialization. ServletContext
defines a set of methods that a servlet uses
to communicate with its servlet container to get the MIME type of a file,
dispatch requests, or write to a log file, for example. The ServletContext
object is contained within the ServletConfig object, which the Web server
provides the servlet when the servlet is initialized.  Since HttpServlet
implements ServletConfig, it's ServletContext is available from both.

Nothing. In Servlet 2.1 GenericServlet was modified to accept a no-agrument
init() and ServletConfig is handled in the background.

Mark

-----Original Message-----
From: Deepak Rustagi [mailto:[EMAIL PROTECTED]]
Sent: Thursday, May 02, 2002 4:18 AM

> hi,
>
>       I have a doubt about ServletConfig and ServletContext object.
> ServletConfig is passed by the container and has method
> getServletContex(), but we can
>       call getServletContext() directly also as it's provided in
> HttpServlet.So, why it's provided in ServletConfig interface.
>
>       Secondly what would happen if i will not intialize the
> constructor super.init(config) inside the init.
>
> Thanks
> Deepak Rustagi

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to