Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

loading properties file for a component.

 
Ritesh Srivastava
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

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.

Thanks,
Ritesh
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic