lookup problem- "java:comp/env"
843841Jan 23 2004 — edited Jan 23 2004Hi ,
I have deployed my web application on OC4J server , containing a test.jsp page and the required WEB-INF directory.Now if I do a look up of
an ENV-ENTRY defined in web.xml,in test.jsp,the same throws an exception.The code is:
//=========================
//Code(test.jsp):
Context initContext = new InitialContext();
Context envContext = (Context)initContext.lookup("java:comp/env");
//it fails before the line below is exeuted.
String temp = (String) envContext.lookup("xyz/pqrs");
//===========================
This works perfectly in Tomcat but fails in OC4J environment.
I am wondering if this could be container dependent feature.
Any suggestions will be greatly appreciated.
Thanks.