• Post Reply Bookmark Topic Watch Topic
  • New Topic

web.xml  RSS feed

 
Amirtharaj Chinnaraj
Ranch Hand
Posts: 242
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi guys

iam having a doubt that how many times web.xml

is read by the container

is it like jsp when ever you are modifying the

web container will read the web.xml

regards
amir
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Officially, this is not required by containers. But some containers may offer this facility. For example, Tomcat offers this facility, by setting the "autoDeploy" property to true.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1325
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when the Container makes a servlet, it reads the DD and creates the name/value pairs for the Servlet Config. Reference HFSJ
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure this is related to the question
 
Burcu Akkoc
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
web.xml is read by the container only once.
Because deployment descriptor holds the initialization parameters, it is required to be read at the beginning of the servlet`s lifecycle.
Therefore, if you make any changes on the web.xml, you suppose to re-start your server, so the parameters would be re-initialized.
Burcu
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
web.xml is read by the container only once.
...
Therefore, if you make any changes on the web.xml, you suppose to re-start your server.


This is not quite correct.

It's true that without restarting the web app any changes in web.xml will not be picked up.

But as Satou points out, the container may indeed check web.xml periodically, and if it finds it changed, may restart the web app automatically.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!