A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Java EE 7 Tutorial Volume 1 or Volume 2
this week in the
jQuery UI in Action
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
It is sorta covered in the
JavaRanch Style Guide
subject: loading properties file for a component.
Best place for .properties file?
JBoss class loading and reading .properties files
Servlet 2.3 Specification contradiction ?
ANT: update JAR file
loading properties into the classpath
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014