Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
this week in the
loading properties file for a component.
Joined: Jul 06, 2005
Jun 25, 2007 03:59:00
I have created a jar file which is going to use a propeties file.
The jar file is placed in C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps\myApplication\WEB-INF\lib
There is a class in the jar which is trying to load the properties file and then access its values.
I have put the properties file in WEB-INF\classes as well as the root of the folder which is later converted to a jar.
How can I load the properties file? I tried different ways like using Thread.currentThread().getContextClassLoader().getResourceAsStream and some other wasy.
Joined: Dec 11, 2004
Jun 25, 2007 04:36:00
This page from the
documentation shows two ways:
How to ask a question...
Simple Servlet Examples
I agree. Here's the link:
subject: loading properties file for a component.
ANT: update JAR file
Servlet 2.3 Specification contradiction ?
loading properties into the classpath
Best place for .properties file?
JBoss class loading and reading .properties files
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015