users@glassfish.java.net

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

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

When the server starts up, its working directory (as returned by System.getProperty("user.dir")) is
set to config folder (for some reason).

That's why menu.xml is searched for in that folder.

This is not a good practice anyway (to find your resources this way). Have you looked at:
http://java.sun.com/javaee/5/docs/api/javax/servlet/ServletContext.html#getResourceAsStream(java.lang.String)?

Thanks,
Kedar
[Message sent by forum member 'km' (km)]

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