Tomcat 6 webapp with datasource deployment

What is the best way to deploy an app with datasource both in development and in production environments?

It is recommended to use META-INF/context.xml to specify Tomcat context but I don't understand how should I specify datasource in context.xml:

  1. it's unsafe to put database password in context.xml which can be viewed by all;

  2. how do I maintain two different datasources for production and devel mode?

How do you solve this problem?

6
задан Brian Tompsett - 汤莱恩 11 June 2015 в 12:36
поделиться