Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to load properties file

 
Tamil Elamukil
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a dynamic web project. And i have my .properties file in webcontent/config/myApp.properties

I am able to read the properties file from servlet using


But i have a java class propertyloader.java in some package. All I wanted to do is load this property file from the class instead of servlet.

Any help will be greatly appreciated.

Thanks in advance.
 
Nishan Patel
Ranch Hand
Posts: 689
Eclipse IDE Java Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Tamil,

Welcome to Java Ranch......

Refer below link I think this will solve your problem !!

Load Property File

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic