Currently I am using this for JBoss, but I need something also for an external Tomcat:
Properties props = new Properties();
props.put(Context.PROVIDER_URL, "jnp://localhost:1099");
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client");
props.put("j2ee.clientName", "abtest");
Searching with Google I find this ones, but I am not able to figure out what Tomcat's port configuring to accept JNDI connection...
props.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.naming.java.javaURLContextFactory");
props.put(Context.PROVIDER_URL, "http://localhost:???");
Please can You help me?