File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes how to load properties file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "how to load properties file" Watch "how to load properties file" New topic

how to load properties file

Tamil Elamukil

Joined: Sep 09, 2009
Posts: 1
I have a dynamic web project. And i have my .properties file in webcontent/config/

I am able to read the properties file from servlet using

But i have a java class 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

Joined: Sep 07, 2008
Posts: 689

Hi Tamil,

Welcome to Java Ranch......

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

Load Property File

Thanks, Nishan Patel
SCJP 1.5, SCWCD 1.5, OCPJWSD Java Developer,My Blog
I agree. Here's the link:
subject: how to load properties file
It's not a secret anymore!