• 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
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Public Service Announcement - Change to Tomcat deployment

 
Bartender
Posts: 20838
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Certain things become Known in the software world (and elsewhere) and are propagated long after they become false. I just learned about a new one.

I've always warned people about deploying WAR files that Tomcat had a certain non-intuitive behavior. If the UnpackWars option was true (which it is by default) and you deploy by dropping a WAR file into the TOMCAT_HOME/webapps directory, Tomcat would unpack the WAR file and deploy the unpacked WAR. If you updated/replaced the WAR file, however, Tomcat did not update the unpacked WAR, which meant that the only way to get changes to a WAR file to "take" was to delete the unpacked WAR directory.

According to some JavaDocs I just read, that behavior is no longer true as of Tomcat version 8.0.2. Supposedly for that and all later releases, changing the WAR file will now automatically change the unpacked WAR.

It's still safe to delete the exploded WAR directory before updating a WAR file, but should no longer be essential.
 
Saloon Keeper
Posts: 5579
144
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is good to know, deleting the unpacked directory has been part of my deployment habits for a long time. Do you happen to have a link to where that is mentioned?
 
Tim Holloway
Bartender
Posts: 20838
125
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I read in in the JavaDocs for Tomcat's addWebapp() embedding method. But something that momentous is something I'd expect to see in the release notes.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!