【发布时间】:2009-12-16 19:30:33
【问题描述】:
我在 tomcat 中使用 LifecycleListener 来初始化 Web 服务器中上下文所需的一些对象。在 LifecycleListener 中,我想访问 GlobalNamingResources 环境变量,以将服务器的配置保存在 server.xml 文件中。尝试各种方法时,出现以下错误:
javax.naming.NameNotFoundException: Name java:comp is not bound in this Context
我假设在服务器启动过程的这个阶段没有初始化 jndi。关于如何解决这个问题的任何想法?
【问题讨论】:
标签: tomcat