On Fri, 10 Sep 2004 15:59:01 -0500, Dave Bender <[EMAIL PROTECTED]> wrote:
> How do you easily move a Struts application from one environment to another,
> e.g. from development to test to production, without having to change the
> struts-config.xml file to use a different database?
> 
> The datasources seem like they can be configured only in that file, but if
> you want to have different database configs in the different environments,
> it seems like you have to edit that file.  Am I missing something? Is there
> a way around that?
> 

This is one of several reasons that you should really be using JDBC
data sources provided by your application server, instead of the
legacy ones defined in struts-config.xml.  When you do this, your
application just uses a logical *reference* to the data source, and
the configuration details are administered in each server instance --
thus allowing you to take the same WAR file and deploy it in
development, test, and production environments.

For more info on how this works in Tomcat (the way data sources are
configured is Tomcat specific, but the programming steps to use them
is not), see:

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html

http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html


> Dave

Craig

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to