This week's book giveaway is in the Android forum.
We're giving away four copies of Head First Android and have Dawn & David Griffiths on-line!
See this thread for details.
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


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets" Watch "Servlets" New topic
Author

Servlets

Hyndavi Padamata
Greenhorn

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

Joined: Jan 10, 2002
Posts: 63053
    
  69

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] [Bear's FrontMan] [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.
 
 
subject: Servlets
 
It's not a secret anymore!