Win a copy of Machine Learning with R: Expert techniques for predictive modeling this week in the Artificial Intelligence and Machine Learning forum!
  • 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
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Public Service Announcement - Change to Tomcat deployment

 
Saloon Keeper
Posts: 21141
134
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: 5815
146
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
Saloon Keeper
Posts: 21141
134
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.
 
Come have lunch with me Arthur. Adventure will follow. This tiny ad:
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!