2 Replies Latest reply on Nov 4, 2002 6:25 PM by Weston M. Price

    MalformedURLException: unknown protocol: jndi

    Stefano Spaziani Newbie

      Hi all
      I deployed into Jboss 3.0 a servlet in a war file.
      I would like have access to a resource (an XML file) located in /WEB-INF/ path of that war. I call the getResource method of the Context object and I pass the result to an URL ... nut I throw in an exception

      "MalformedURLException: unknown protocol: jndi"

      This is the code :

      requestMappingsURL = context.getResource("/WEB-INF/mappings.xml").toString();

      URL url = new URL(requestMappingsURL );

      The "requestMappingsURL" is "jndi:/localhost/myapp/WEB-INF/mappings.xml" .
      WHere is the error ?
      Please help me