File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
EJB 3 in Action
this week in the
EJB and other Java EE Technologies
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.
Servlet 2.3 Specification contradiction ?
Best place for .properties file?
loading properties into the classpath
JBoss class loading and reading .properties files
ANT: update JAR file
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014