users@glassfish.java.net

java.io.FileNotFoundException tried to access a xml file with jdom

From: <glassfish_at_javadesktop.org>
Date: Tue, 07 Aug 2007 13:12:36 PDT

Hello,

i tried to get access to a xml file from a bean, which i ll call from a JSP (jsp:usebean...).
The bean includes the following lines to get access to the xml file.

[b] File f = new File("menu.xml");
    SAXBuilder builder = new SAXBuilder();
    Document doc = builder.build(f);
[/b]

I put the xml-file within the folder of the bean and deployed the application with Netbeans 5.5 to the glassfish server 1.x.

When i start the application within a browser i got the following errormessage:

[b]java.io.FileNotFoundException: C:\glassfish\domains\domain1\config\menu.xml[/b]

Why does the server search in [b]C:\glassfish\domains\domain1\config\menu.xml[/b] and not in the folder, where i put my xml file?

Is it a configuration issue?

Any help would be very nice and excuse me for my bad english :)
[Message sent by forum member 'merschi' (merschi)]

http://forums.java.net/jive/thread.jspa?messageID=229908