You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Yonghui Chen <ch...@yahoo.com> on 2001/07/20 17:49:47 UTC

About jndi

Hi all,

I have just set a env-entry in web.xml, how can I use
jndi to find it a java:comp/env/test?

    <env-entry>
      <env-entry-name>test</env-entry-name>
     
<env-entry-type>java.lang.String</env-entry-type>
      <env-entry-value>this is a
test</env-entry-value>
    </env-entry>

I just use 
InitialContext ic = new InitialContext();
Object obj = ic.lookup("java:comp/env/test");


but it throws a exception says that I have not set the
jndi factory. Could you have me? 

Thanks you first.

_________________________________________________________
Do You Yahoo!? 登录免费雅虎电邮! http://mail.yahoo.com.cn

<font color=#6666FF>无聊?郁闷?高兴?没理由?都来聊天吧!</font>―― 
雅虎全新聊天室! http://cn.chat.yahoo.com/c/roomlist.html