Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servletconfig  RSS feed

 
bobby chaurasia
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm really not sure I understand the concept of servlet config wrt to servlets. Can somebody throw some light on this.....
Thanks
 
Asher Tarnopolski
Ranch Hand
Posts: 260
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
well, if you will take a look on the ServletConfig api you'll se a couple of methods there.
getInitParameter() is very useful - you can path init parameters from deployment descriptor to your servlet.
what exactly don't you understand?
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13078
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You really should download the Servlet and JSP API documents from Sun - they are in PDF format and have lots of details on what a "Web Application" is and what servlet context and servlet configuration are used for. The explanations are better than the short ones that appear in the JavaDocs.
Bill
 
Siva Jagadeesan
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServletConfig, is nothing but a object that encapsulates the configuration details of the servlet. This object will hold the informations (and also some more info .. pls chk the Java Doc) that are present about that Servlet in the web.xml
like init parameters etc.
To Summarize, ServletConfig is the configuartion details of the Servlet and ServletContext is the window for the Servlet to look out in what "Context" it is running
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!