I've created a jar from my Java project and wanted to use the same jar in a JSP Servlet Project. I'm trying to load a property file let say sample.properties from my JSP Servlet Project kept in WEB/properties/sample.properties which should be read by a class in the jar.I'm using the following code wriiten in a class of jar to access it.
Properties prop=new Properties();
prop.load(/WEB-INF/properties/sample.properties);
But each time I'm getting fileNotFound exception.
Please suggest me the solution.
Here is the structure
WEB-INF
|
lib
|
myproject.jar
|
myclass (This class needs to read sample.properties)
|
properties
|sample.properties