This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.