tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luca Biolcati" <>
Subject JNDI problem
Date Fri, 11 Jan 2002 13:57:46 GMT
I'm a newbie wioth tomcat and JNDI, trying to use an eviroment variable with
Tomcat 4.0.1 in my web app. The following exception occurs when I try to
read it:

javax.naming.NameNotFoundException: Name java:comp is not bound in this

this is the code that try to read that variable (following the example in
tomcat doc):

Context initCtx = new InitialContext();
Context envCtx = (Context) initCtx.lookup("java:comp/env");
String home = (String) envCtx.lookup("xsl-home");

and here is how I've configured my web.xml:



Do I need to initialize somehow the java:comp/env Context?
Thanks for any suggestion,

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message