How to change database settings for a deployed war file?

偶尔善良 提交于 2019-12-20 04:23:40

问题


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:


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




回答2:


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.



来源:https://stackoverflow.com/questions/3327341/how-to-change-database-settings-for-a-deployed-war-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!