File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Other Application Frameworks and the fly likes How to Externalize properties outside WAR file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "How to Externalize properties outside WAR file" Watch "How to Externalize properties outside WAR file" New topic

How to Externalize properties outside WAR file

Sarin Kuraganti

Joined: Sep 04, 2003
Posts: 24
Hi All,

I am trying to externalize the properties outside of a war file as this is an absolute necessity for our application. I found a way in the Spring forum as described below, but that doesn't seem to be working. Can you please let me know how to externalize properties outside of the war file and still refer to those properties in web.xml, applicationContext.xml and XXX-servlet.xml? Thanks in advance for any help or pointers.

I'm using Tomcat 5.5.27 and Spring 2.5

Here's what I've found:

Then in my Spring bean files, I extract the value from JNDI and define and configure the PropertyPlaceholderConfigurer as such:

I agree. Here's the link:
subject: How to Externalize properties outside WAR file
Similar Threads
Using PropertyPlaceholderConfigurer to read in external properties - not working
Problems with Spring setup in tomcat
Tomcat application won't start with MySQL Connection Pooling
Can you please tell me what the PropertyPlaceHolderConfigurer is and its usage with example
read properties in my java application defined in spring bean "PropertyPlaceholderConfigurer"