February 20th, 2013, 02:14 AM
Change web.xml after deployment
Is it advisable to change web.xml (or, in fact, any other file) in app server after the deployment? Do ALL app servers expose their deployment/directory structure?
I would prefer making changes locally, re-building the war (or .ear, etc.), and re-deploying the application.
Any suggestions / comments. Thanks.
February 20th, 2013, 12:45 PM
Most servlet containers automatically reload the app with a change to web.xml. Static resources like .css, .html, etc. would be available after a browser refresh with no action from the servlet container (usually - some do some internal caching). Some servlet containers will watch the "classes" directory for changes too.
The advantage of that is that, for development, you don't have to do a full app reload. I would not want this to happen for production. If I made a typo or if my webapp didn't reload correctly I could easily take down the production system. However, if just anyone can change your web.xml in production you have more serious issues.
The file system can be exposed - this is an "exploded" war file format. Otherwise it can be in a .war file as you indicated. Traditionally an exploded war file is used in development while a normal war file is used in production.
February 21st, 2013, 05:58 AM