views:

35

answers:

2

We have a WAR file that is deployed however we want to change the database settings. How do I get about doing that? I opened the WAR file in an IDE and there are like 2-3 places that have the database settings. What is the proper way of changing it?

Thank You

+1  A: 

The proper way is to use a datasource at the application level and to administer it at the application server level. Check the MySQL DBCP Example in the Tomcat documentation.

Pascal Thivent
Pascal, I am new at this so maybe am not getting it. All I want to do is change from one database to another. I un-tarred my war file and changed the database settings in the DataBase.properties file. I then made it a WAR file and tested it and it was still pulling data from the old database.
jini
A: 

The tomcat instance should be set up to provide a datasource through JNDI.

Thorbjørn Ravn Andersen