it may not work If you are try to load the properties from jsp/servlet. Write a utility class to read properties and package along with jar file. copy the properties file into same package as of utility.
Class Utility{
Properties properties=null;
public void load() throws IOException{
properties.load(getClass().getResourceAsStream("sample.properties"));
}
public Object get(String key) throws IOException{
if (properties==null){
load();
}
return properties.get(key);
}
}
Now use this utility class from servlet to read the property values. May be you can define the class as singleton for better practice
Cheers
Satheesh