benstpierre
benstpierre

Reputation: 33571

Where does tomcat put files after a war is deployed?

I deployed a rather large war file that had the database config baked into persistence.xml in META-INF. I would rather not have to re-upload this just to change the jdbc-url/user/password.

As far as I know Tomcat "explored"/unpacks a war to working directory. If I just need to go in and manually change a config file that was bundled with the war where would I look?

Upvotes: 0

Views: 484

Answers (1)

Sky Kelsey
Sky Kelsey

Reputation: 19280

Can't you just go to the tomcat root directory on your command line and run:

find . -name "persistence.xml"

A better way to do this though would be to simply unzip the war and then copy the contents to your context root. That way to modify anything you would just have to reboot tomcat. I like to set up an Ant target for dev that copies all the changed files over into my context directory. I keep a release target for when I actually want to create a WAR for deployment.

Upvotes: 1

Related Questions