2 Replies Latest reply on Sep 8, 2002 8:29 PM by Joel Vogt

    jndi.properties for jsp/servlets

    Chris Mactaggart Newbie

      Where do I put my jndi.properties file when I am trying to reach an entity bean from my jsp page?

      Do I even need a jndi.properties file?

      ROOT PROBLEM:

      javax.naming.NameNotFoundException: contact not bound

      I am getting this error when I try to access my jsp page. I am assuming that it is a jndi problem and it is looking for my jndi.properties file.

      My jsp code

      <%@ page import="csm.test.contact.*" %>
      <%@ page import="javax.naming.*" %>
      <%@ page import="javax.rmi.*" %>

      <%

      InitialContext ic = new InitialContext();
      Object homeObject = ic.lookup("contact/Contact");

      ContactLocalHome home = (ContactLocalHome)PortableRemoteObject.narrow(homeObject, ContactLocalHome.class);

      %>

      Thanks