Win a copy of Bad Programming Practices 101 (e-book) this week in the Beginning Java forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Public Service Announcement - Change to Tomcat deployment  RSS feed

 
Bartender
Posts: 19550
90
Android Eclipse IDE 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: 4553
112
  • 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: 19550
90
Android Eclipse IDE 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.
 
Do you pee on your compost? Does this tiny ad?
Why should you try IntelliJ IDEA ?
https://coderanch.com/wiki/696337/IntelliJ-IDEA
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!