L
laredotornado
Hi,
I'm creating a web application (WAR) for a server running a Java 1.5
VM. Although I have verified that my file, jndi.properties, is part
of my WAR file (file located within the classes directory), this code
InitialContext ctx = new InitialContext();
final String val = (String) ctx.lookup(property);
LOGGER.info("lookup " + property + "=" + val);
fails to retrieve any properties (for each lookup, a null is returned
every time). What am I missing? I thought the documentation said
that as long as I included jndi.properties somewhere in my classpath,
I would be able to read properties from the file --
http://java.sun.com/products/jndi/tutorial/beyond/env/source.html ?
Thanks for any advice, - Dave
I'm creating a web application (WAR) for a server running a Java 1.5
VM. Although I have verified that my file, jndi.properties, is part
of my WAR file (file located within the classes directory), this code
InitialContext ctx = new InitialContext();
final String val = (String) ctx.lookup(property);
LOGGER.info("lookup " + property + "=" + val);
fails to retrieve any properties (for each lookup, a null is returned
every time). What am I missing? I thought the documentation said
that as long as I included jndi.properties somewhere in my classpath,
I would be able to read properties from the file --
http://java.sun.com/products/jndi/tutorial/beyond/env/source.html ?
Thanks for any advice, - Dave