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