2 Replies Latest reply on Feb 11, 2002 6:16 PM by mkotsbak

    jsp/servlet jndi lookup

    gordonlch

      Hi all,


      Any better sulotion that i can set the jndi info., let the Context.lookup?
      now, i all the way use following code:


      ---->8-----
      Properties _props = new Properties();
      _props.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
      _props.setProperty(Context.URL_PKG_PREFIXES, "org.jnp.interfaces");
      _props.setProperty(Context.PROVIDER_URL, "localhost:1099");
      Object ref = new InitialContext(_props).lookup("MyEJB");
      ---->8-----

      sure, i could read a property file, but could i setup the jndi info at tomcat, that my app don't need care about where lookup myEjb?

      Gordon