How to load a properties file put in the classpath from a JSP?

Posted by PSP on Stack Overflow See other posts from Stack Overflow or by PSP
Published on 2010-05-31T10:27:22Z Indexed on 2010/05/31 11:23 UTC
Read the original article Hit count: 170

Filed under:
|

I have a properties file which I have put in the classpath and I am trying to load it from a JSP:

InputStream stream = application.getResourceAsStream("/alert.properties"); 
Properties props = new Properties(); 
props.load(stream); 

But I am getting a FileNotFoundException.

© Stack Overflow or respective owner

Related posts about java

Related posts about jsp