aspose file tools*
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
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: 61658
    
  67

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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Servlets