Craig, Thanks. That will do the trick for the database connection. I have a JNDI connection for another non-Struts application and it does solve the environment problem.
A related question, though: Is there an elegant solution for path variables and LDAP connections? I see the prevalance of Ant for doing this, and that does solve the problem, but making changes to the configuration files, even though it is done programmatically, seems like it's crossing the line of having separate environments for development, testing and production. Dave -----Original Message----- From: Craig McClanahan [mailto:[EMAIL PROTECTED] Sent: Friday, September 10, 2004 4:17 PM To: Struts Users Mailing List Subject: Re: Moving from environment to environment 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]