4 Replies Latest reply on Nov 17, 2003 1:37 PM by CTB

    ServletContext.getRealPath() does not work in JBOSS 3.2/Tomc

    jodybrownell1 Newbie

      Hello all,

      I have written an application listener to listen the contextInitialized event. At which time I am attempting to find the absolute file path of my application context via the following call ...

      String realPath = contextEvent.getServletContext().getRealPath("/");

      The value returned is always null. If I run this same code in tomcat 4.1.24 from jakarta (with no jboss) ... all is well. The path is resolved appropriately.

      Any thoughts? Does anyone know of a work around, or am I missing something obvious ....

      This is also posted in HTTPD, JSP/Servlet as well .... sorry about that :)

      thanks in advance.