tags:

views:

44

answers:

1

i want to lookup object from servlet to jdbc through JNDI what is the exact code for this process?

+1  A: 

may depend on your servlet container:

String initialContext = "java:comp/env";  
Context env = (Context) new InitialContext().lookup(initialContext);
Object o = env.lookup(name);
objects