2 Replies Latest reply on Oct 23, 2010 3:50 PM by Sheeraz Junejo

    XML Not found

    Sheeraz Junejo Newbie

      Hi Guys,


      I have two XML file present root of my WAR deployed on jBoss 4.2.3 GA. I am trying to load these XML in JSP page but getting following error message;


      Exception : C:\jboss-4.2.3.GA\bin..\ofs-examples.xml.


      The problem is that jBoss is looking the XML in jBoss 'bin' directory rather than from 'abc.war'.


      Am I missing anything? I want jBoss to start looking under my 'war' as root directory.


      Also I didn't configure anything related to these xml anywhere in my 'web.xml' (deployment descriptor).


      Hope I am making some sense;







        • 1. Re: XML Not found
          jaikiran pai Master

          What does the code which tries to load that XML, look like? If you want the XMLs to be part of the classpath then a better place is JBOSS_HOME/server/< servername>/conf folder.

          • 2. Re: XML Not found
            Sheeraz Junejo Newbie

            Hi Jai,


            I want to provide this file with my WAR as a package and want to use in my WAR only. I am using following standard code to load XML file;


            String exampleFilePath = "../examples/ofs-examples.xml";    <-- This path is relative to my WAR file like we use in our JSP pages for redirection


            DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
            DocumentBuilder db = dbf.newDocumentBuilder();
            Document doc = db.parse(exampleFilePath);