tags:

views:

143

answers:

2

How to make use of jndi in a stand-alone (non-managed) application? App and Tomcat6 are on the same machine.

Can we get something through jndi lookup when the server is running, but when the app is not running under this tomcat server?

A: 

Performing a lookup is only a matter of creating an InitialContext with the valid parameters. Considering you have a Tomcat running on your machine, you should be able to find the required context parameters in server.xml.

Riduidel
+1  A: 

If I understand your question correctly, you want to use the Tomcat JNDI outside of the Tomcat web app. I think Tomcat does not expose the JNDI externally. See this link:

http://wiki.apache.org/tomcat/FAQ/Miscellaneous#Q22

JoseK