Friday, December 14, 2007

Tomcat and app-name.xml

I'll start with a stupid but frustrating problem I had this morning.

I have a Tomcat server set up on my machine as a development server, and we deploy tested code on a production server.

The application-name.xml file in the META-INF directory gets copied to the conf/catalina/localhost directory when a War file is deployed on a Tomcat server using Tomcat's HTML manager.

This morning, then, I had to change the connector description for an application because we were switching database servers. So, I changed the description in the META-INF directory, repackaged my War file, and deployed on my server. When I tested the application, data was saved to the original database, and not the new one.

For some reason, the xml file in conf/Catalina/localhost was not being replaced with the new one. I deleted it, re-deployed the War, and voilĂ , the new database was now active...

Stupid, but it made me waste time.

Very humbly,


No comments:

Post a Comment