InputStream is = getClass().getResourceAsStream("/file.properties"); properties.load(is);
Assuming that the file.properties file is located directly under your classes directory
deepaksawdekar wrote:
I am using following code to access the property from properties file in my action class. Code snippet is as follows... .. InputStream in = ClassLoader.getSystemResourceAsStream( propertyFilePath); properties.load(in); value = properties.getProperty(key); ....
When I write the main in action class it works fine
but when i copied the same code to execute method, the code does not load the propertyfilepath file properly even though in both the case class path and location of file is same.
Am i doing something wrong.
Deepak
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]