Yes , I deploy the class on Tomcat and calling my class as a standalone Java program from the command line. Becase I want get JNDI through my class. What can I do if I want to use JNDI through class not in JSP? [ July 19, 2007: Message edited by: avseq anthoy ]
Originally posted by avseq anthoy: Error message as below: Exception in thread "main" javax.naming.NameNotFoundException: java:/comp/env
The java: namespace is not available outside the application server JVM. Since you are looking up a object in the JNDI tree from a standalone java class, you will have access to only the global jndi namespace objects.