Hello,
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
Context

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:

===========================================
<env-entry>
  <env-entry-name>xsl-home</env-entry-name>

<env-entry-value>D:/Programmi/eclipse/workspace/webmodel/web/WEB-INF/xsl</en
v-entry-value>
  <env-entry-type>java.lang.String</env-entry-type>
 </env-entry>
===========================================

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


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to