Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

how to load properties file  RSS feed

 
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

 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!