Dave Bender 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?
If you're using ant, then you could maintain 2 seperate struts-configs and <copy> the production config (e.g., struts-confg-production.xml), into you deployment directory as struts-config.xml. This would require that you maintain 2 copies of struts-config.xml: struts-config-development.xml and struts-config-production.xml, for example.
Another option is to use filters along with ant's copy task:
http://ant.apache.org/manual/CoreTasks/copy.html
I personally maintain 2 properties files: application.properties and application-production.properties and use the method of replacing files in a deployment directory. My struts-config, however does not change. That's just how my project is setup.
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?
I think JNDI is useful this kind of problem as well, but I don't have much experience with it.
- Dave
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]