I've put META-INF/context.xml in my WAR, with following content
<Context> <Environment name="data-directory" value="/some/path"
type="java.lang.String"/> </Context>
In tomcat I used
Context initContext = new InitialContext(); Context envContext
= (Context) initContext.lookup("java:/comp/env"); String
dataDir = (String)envContext.lookup("data-directory");
to obtain "data-directory".
But how is this done in Glassfish?
I tried above code, and following:
Context initContext = new InitialContext(); tring
dataDir = (String)initContext.lookup("data-directory");
but I always got a NamingException ("Lookup failed").
Any suggestions?
--
[Message sent by forum member 'gernot1']
View Post: http://forums.java.net/node/795434