users@glassfish.java.net

File Write from servlet, why the file is created in domains/domain1/config

From: <glassfish_at_javadesktop.org>
Date: Fri, 21 Nov 2008 04:54:55 PST

I have written a simple servlet and in its doGet method i have the following:

                FileWriter fileWriter = new FileWriter("test.properties");
                fileWriter.write("name=value");
                fileWriter.close();

After accessing the servlet, i see that the file "test.properties" is created in <GF-home>/domains/domain1/config . What determines that the file should be created in config directory?

Later when i want to access via ResourceBundle.getBundle("test"), i get java.util.MissingResourceException: Can't find bundle for base name test, locale en_US

Am i missing something.

Thanks,
Deepak
[Message sent by forum member 'dgothe' (dgothe)]

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