wood burning stoves 2.0*
The moose likes Tomcat and the fly likes Cant find resource file inside tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Cant find resource file inside tomcat" Watch "Cant find resource file inside tomcat" New topic
Author

Cant find resource file inside tomcat

Ralph Ching
Greenhorn

Joined: Jul 18, 2006
Posts: 15
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

Joined: Jan 10, 2002
Posts: 60057
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

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.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Cant find resource file inside tomcat
 
Similar Threads
Parent for tag files
Acessing files from Web Application.
Unable to get TomcatManager console
How to play audio using this code in Grid View
tomcat cant find my form.html?