• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

When web.xml is loaded?

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When Tomcat loads the web.xml file? Only when the first request is made?
What is the container lifecycle, since its start?
 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It will be read at startup. If you make your application reloadable, it will also be read when changes are made to it.
 
Bartender
Posts: 20938
127
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
More accurately, the Tomcat deployer reads, digests, and applies web.xml to build Tomcat-internal app support objects. The application itself doesn't access web.xml, but it's one of 2 deployment descriptors used when a webapp is deployed. Web.xml is the container-independent deployment spec. The other deployment descriptor is container-specific, and in the case of Tomcat, it's the Context definition supplied or synthesized when a webapp is deployed.

Under normal circumstances, all eligible webapps are deployed at server startup and when the webapp WAR or Context definition is changed. Redeploying on a change is optional, but enabled by default. Tomcat scans the webapps at intervals and redeploys eligible webapps, so the redeployment isn't quite instantaneous, but it's a fairly short interval by default.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!