I am having trouble setting my servlet's JNDI properties using a
simple jndi.properties file.
I have read the mailing list archive, and tried all of the suggested
locations - /WEB-INF/classes/, /WEB-INF/lib/, /WEB-INF/, even the top
level application application directory and all the META-INF directories.
None of these locations work in terms of loading jndi.properties when
my servlet runs. What gives? Is this because the servlet engine has
loaded jndi.properties from some other location?
I have resorted to placing the properties in web.xml and put-ing them
into the System properties in my init(). Is this the best approach? The
entire InitialContext paradigm concerns me in a shared environment like
a servlet engine JVM. What happens when another servlet modifies these
properties to access an LDAP server?! Do I need to consider setting
these properties everytime I get the InitialContext, or do I need to
consider caching the InitialContext once I get it?
TIA,
tim.