dev@glassfish.java.net

Re: name of config directory?

From: Ludovic Champenois <Ludovic.Champenois_at_Sun.COM>
Date: Wed, 12 Aug 2009 15:56:53 -0700

On 8/12/09 3:29 PM, Bill Shannon wrote:
> I'm writing some code that runs in the server and needs to create a file
> in the config directory for the current domain. What's the right way to
> get a String or File object representing the config directory?
>
>
   I think
@Inject org.glassfish.server.ServerEnvironmentImpl env;
...
String rootFolder =
env.getProps().get(com.sun.enterprise.util.SystemPropertyConstants.INSTANCE_ROOT_PROPERTY)
;
should gives you the domain dir, then /config is under it.

Ludo