How can i load the property files smartly using struts Framework.As per my project requirement, i like to load any of the 3 property files based on the environment (like development,QA and production environment).Please let me know how it can be achieved . Thanks in advance.
Regards<br /> <br />Mohammed Yousuff M N <br /> <br />Try NOT to Become a man of SUCCESS, BUT Try to Become a man of VALUE..
I normally do it during the build process where I can specify the environment.
Other than this I am guessing that we will have to write some kind of logic with in application class loader that picks up the environment specific property file(You may have to bundle all the environment specific property files along with your jar/war/ear).
Would be interested in knowing if other alternatives can be used.
One of my clients accomplished this using Java System properties (System.getProperty()). They set an Environment property for each of their environments (PROD, QA, Or DEV). The application logic would then look at this property and load the appropriate properties file.