This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes ServletConfig Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "ServletConfig" Watch "ServletConfig" New topic
Author

ServletConfig

Don Bosco
Ranch Hand

Joined: Oct 31, 2002
Posts: 108
Guys correct me if i'm wrong.
When a servlet is deployed, the servlet engine will look at the web.xml file of the application and builds a ServletConfig object and passes this object to the init function.


SCJP 1.4<p>Wingardium Leviosa!!
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12759
    
    5
You are correct. ServletConfig has the servlet specific data from web.xml - ServletContext is also of interest in giving the "web application" specific data.
You can find the complete set of rules which answer all questions like this for the servlet and JSP environments at java.sun.com in the form of some big .pdf files.
Don Bosco
Ranch Hand

Joined: Oct 31, 2002
Posts: 108
Thanks Bill!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ServletConfig
 
Similar Threads
why init() method is not final?
Multiple threads of a servlet instance and servletConfig
passing ServletContext
ServletConfig Interface
Why does GenericServlet implements ServletConfig?