2 Replies Latest reply on Nov 2, 2005 11:22 AM by pv2005

    Path to Server Root

    pv2005

      Hi,

      I have put a war in default/deploy in wich I hava a class that reads a xml file.

       Document doc = parseXmlFile("infilename.xml", false);
      


      where should I put the xml? What's the root of the server?

      thanks

        • 1. Re: Path to Server Root
          utjazz

          You could create an emtpy file:

          try{
          File nf = new File("infilename.xml");
          FileWriter fw = new FileWriter(nf);

          fw.write("where am i");
          fw.close();
          System.out.println("done");
          }catch(Exception e){
          System.out.println(e);
          }

          and then go search for it to see where it got written to. Just an idea.

          • 2. Re: Path to Server Root
            pv2005

             

            "utjazz" wrote:
            You could create an emtpy file:

            try{
            File nf = new File("infilename.xml");
            FileWriter fw = new FileWriter(nf);

            fw.write("where am i");
            fw.close();
            System.out.println("done");
            }catch(Exception e){
            System.out.println(e);
            }

            and then go search for it to see where it got written to. Just an idea.


            That's a very good solution.

            thanks, Pedro