I want to obtain the IntialContext in a standalone
Java class from the
Tomcat which is running on port 8080 on local m/c.
When I try something like this
Hashtable ht = new Hashtable();
ht.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.naming.java.javaURLContextFactory");
ht.put("java.naming.factory.url.pkgs",
"org.apache.naming");
Context ctx = new InitialContext(ht);
It gives error Cannot instantiate class: org.apache.naming.java.javaURLContextFactory. What should be passed as parameter when Intial context is to be abtained from Tomcat outside the webapplication( not in
servlet or
JSP page)?
Thanks!