I am facing problem in retriving the realpath from the servlet. I am using the following code in order to retrieve the path. String prefix = getServletContext().getRealPath("/WEB-INF/classes");
The value returned from above code is null. I am using Weblogic 8.1 server, and deploying my servlet as WAR file inside the weblogic server.
Is this the problem with the weblogic server or with the code. Is there any way to over come this. I need the path as i am implementing Log4j for the servlet and i have to pass the configuration file in one of the function "PropertyConfigurator.configure(file);" where the file should include complete path. My configuration file is in WEB-INF/Classes directory.