Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Using resource files from external location

 
M Sharma
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64833
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic