File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Using resource files from external location Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Using resource files from external location" Watch "Using resource files from external location" New topic
Author

Using resource files from external location

M Sharma
Ranch Hand

Joined: Dec 13, 2001
Posts: 106
I want to package an web application by keeping resource bundle files outside war so that the user can change it easily without tampering war file.

I am using Eclipse IDE and Tomcat 5.x.

Whenever I try to keep the resource bundle outside the application, by setting it in system classpath, I am not able to refer it in the programs.

Kindly help me in this regard.

TIA
[ January 16, 2007: Message edited by: Manish Sachdev ]

Regards, Manish
SCJP 1.4
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61095
    
  66

As you have discovered, the system classpath is not included in web apps.

One way that I have handled similar situations in the past is to identify a location, outside the web app, that the properties file will reside within. I specify this location to the web app as a context parmeter in the deployment descriptor.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
 
subject: Using resource files from external location