the one change i found is
you have written
Context ctx = (Context) new InitialContext().lookup("java:/comp/env");
write
Context ctx = (Context) new InitialContext().lookup("java:comp/env");
notice that u have written java:/comp/env
it should be java:comp/env
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.