users@glassfish.java.net

RE: Glassfish resolve correct filepath

From: Alex Sherwin <alex.sherwin_at_acadiasoft.com>
Date: Tue, 23 Sep 2008 11:11:28 -0400

How are you trying to load/open the file? If its inside a jar, you should be using the classloader to load it as a resource, not trying to open it like: new File("./some-file.txt");




Alex Sherwin
alex.sherwin_at_acadiasoft.com


-----Original Message-----
From: glassfish_at_javadesktop.org [mailto:glassfish_at_javadesktop.org]
Sent: Tuesday, September 23, 2008 11:09 AM
To: users_at_glassfish.dev.java.net
Subject: Glassfish resolve correct filepath

I have a jar file that I am using in a web service that makes a call to open a file like “./file.txt” The problem is that this ./ is not working properly under glassfish. I have it working fine under another web server but simply placing the file up one directory. Any ideas?
[Message sent by forum member 'kjsteuer' (kjsteuer)]

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

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
For additional commands, e-mail: users-help_at_glassfish.dev.java.net