• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How does init(ServletConfig) work?

 
Jian Yi
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does it read a file named as "configFile" and sets the ServletConfig?
 
Sanjeev Kaushik
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It reads the deployment file of your component.
For example when you deploy a servlet in Tomcat, deployment file is web.xml and it reads all the key/values from this file.
Hope it helps.
Sanjeev
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13058
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It is not just Tomcat - ALL Java servlet engines must read web.xml to define the properties of a web application. The DTD for web.xml is a standard.
Higher level definitions are up to the vendor - for example, Tomcat uses server.xml, which is not a standard.
Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic