• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Public Service Announcement - Change to Tomcat deployment

 
Saloon Keeper
Posts: 28327
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Likes 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 7645
178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 28327
210
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Where does a nanny get ground to air missles? Protect this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic