File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Servlets Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets" Watch "Servlets" New topic


Hyndavi Padamata

Joined: Apr 19, 2007
Posts: 12
What is the difference b'ween Servlet Context and Servlet Config?
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63852

Reference the javadoc APi for these classes. They are quite different and cannot be confused.

Also, please read this with regards to your choice of subject. This entire forum is dedicated to servlets so a title of "servlets" won't draw attention to your post.

[Asking smart questions] [About Bear] [Books by Bear]
Amit Kumargupta
Ranch Hand

Joined: Apr 13, 2007
Posts: 54
Both are interfaces. The servlet engine implements the ServletConfig interface in order to pass configuration information to a servlet. The server passes an object that implements the ServletConfig interface to the servlet's init() method.
The ServletContext interface provides information to servlets regarding the environment in which they are running. It also provides standard way for servlets to write events to a log file.
I agree. Here's the link:
subject: Servlets
It's not a secret anymore!