Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cant find resource file inside tomcat

 
Ralph Ching
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,

i have this property file that my web app needs and i decided to put it inside tomcat's conf folder so it could be modified outside the war file(i was assuming it was included in the container's classpath at runtime).

The problem is i cant access it using resourcebundle class. i have done it before using JBoss, but i can't seem to figure out how to do it in tomcat. am i missing something here?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64633
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Firstly, I wouldn't pollute Tomcat's conf folder with your own files. Choose some other specific place for it.

In any case, the conf folder is not added to the classpath, so it won't be available.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Bear Bibeault:
Firstly, I wouldn't pollute Tomcat's conf folder with your own files. Choose some other specific place for it.


Agreed.
The tomcat/shared/classes folder will be on your application's generated classpath.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic