Register / Login
tomcat JNDI bug????
posted 11 years ago
i use JNDI to read some configuration variables... but problem is
that sometimes it works but sometimes it does not (without reconfiguring
in between). I use 5.5.7 on
1.5.0_02 (and I tried this on
Windows and Linux).
Here is definition in application's web.xml file:
I try to read it with:
Context initCtx = new
Context envCtx = (Context) initCtx.lookup("java:comp/env");
uri = (
sometimes it is ok... but sometimes I got next message:
Name java:comp is not bound in this Context
I do not know if this is some misconfiguration or what?
It is sorta covered in the
JavaRanch Style Guide
Lookup strings question
getInitParameter with a MessageDrivenBean
Issue w/ accesing file from a Servlet
Difference between resource-ref and env-entry