Hi,
I am trying to read an environment entry from a simple tag. I am using
Tomcat 3.2 and the code inside the tag is as follows, where "name" is the environmnt entry name, which i have put in the web.xml file.
try{
InitialContext context=new InitialContext();
Object obj=(Object)context.lookup("java:comp/env/"+name);
pageContext.setAttribute(name,obj,PageContext.PAGE_SCOPE);
}catch(javax.naming.NamingException ne){
throw new JspException(ne.getMessage());
}
When i call the
jsp page which consists of the tag, i can see from Tomcat window that environment entry is set initially. but the jsp page, simply gives the exception :
"javax.servlet.ServletException: Need to specify class name in environment or system property, or as an
applet parameter, or in an application resource file: java.naming.factory.initial"
Anybody please help..