ispcorp
asked on
BEA getRealPath for properties file
Hello,
I have a properties file that I need to access within my web application. I built it on JBuilder using Tomcat 4.1, and I call the following method to derive the path for my properties file...
session.getServletContext( ).getRealP ath("/") + "/properties/myprops.prope rties";
In any case, it doesn't work when I deploy it to BEA. The method return a NULL. Any clue on how to retreive the application path of my project within BEA. Thanks.
I have a properties file that I need to access within my web application. I built it on JBuilder using Tomcat 4.1, and I call the following method to derive the path for my properties file...
session.getServletContext(
In any case, it doesn't work when I deploy it to BEA. The method return a NULL. Any clue on how to retreive the application path of my project within BEA. Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Weblogic will always return null if it's deployed as a WAR as well (according to all the sites I could find via google) :-/
Apparently this is right according to the spec, and all other app servers are doing it wrong...
Tim
Apparently this is right according to the spec, and all other app servers are doing it wrong...
Tim
Use either application.getRealPath("/