This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line!
See this thread for details.
The moose likes Tomcat and the fly likes loading properties into the classpath Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » Tomcat
Bookmark "loading properties into the classpath" Watch "loading properties into the classpath" New topic
Author

loading properties into the classpath

Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
Hi, I found out that it is possible to load .properties files into the classpath by simply adding them to the WEB-INF/classes directory and then starting Tomcat. Is also possible to load classes by placing them in WEB-INF/lib? Or do the only files loaded from WEB-INF/lib include .jar files?

I have a jar file that is going to run on a 3rd party j2ee application and I do not have access to a classes directory, but I need to add a property file into the classpath.

Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61315
    
  66

do the only files loaded from WEB-INF/lib include .jar files?


True.

You either need to put the properties file in the WEB-INF/classes hieararchy, or put it in a jar file to drop into WEB-INF/lib.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Andy Hahn
Ranch Hand

Joined: Aug 31, 2004
Posts: 225
That works. Thanks.
 
GeeCON Prague 2014
 
subject: loading properties into the classpath