Can't find properties file path when running uner 4.0.4 Test environment
843841Apr 2 2003 — edited Apr 3 2003Dear all,
I'm deevloping a web application using WSAD 4.0.3, while testing the logic code before begining in the web part, I used:
static {
URL l_url = ClassLoader.getSystemClassLoader().getResource( "a.properties" );
}
the above code is used to search for a specific file in classpath so that I can get its absolute path through the URL object.
And when testing after declaring the location of this file in the classpath of the Java Application every thing goes fine.
BUT
After I made a Web project & tried several times so that My code can locate the specified file by searching in the classpath, but always l_url is returned with null as my code can't locate the file I want.
I tried the following attempts:
1- Setting in the Web Project properties a variable with the directory.
2- In the Server Prespective -> paths -> added variable or external folder.
3- In the source directory of the web project and copied my properties file there so that websphere generate it in WEB-INF\classes, but also without any use.
I tried all the above trials on individual basis but nothing succeeded.
Any help
Thankx