aspose file tools*
The moose likes Tomcat and the fly likes When web.xml is loaded? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "When web.xml is loaded?" Watch "When web.xml is loaded?" New topic
Author

When web.xml is loaded?

Mauricio Lopes
Greenhorn

Joined: Aug 04, 2009
Posts: 12
When Tomcat loads the web.xml file? Only when the first request is made?
What is the container lifecycle, since its start?
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

It will be read at startup. If you make your application reloadable, it will also be read when changes are made to it.


[My Blog]
All roads lead to JavaRanch
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16058
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: When web.xml is loaded?