[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Problem by using Tomcat (web) to access JBoss (app)

jaikiran do-not-reply at jboss.com
Mon May 12 11:56:28 EDT 2008

anonymous wrote : InitialContext ctx = new InitialContext();

You will have to change this to pass the context information. That will help Tomcat know that you are looking for an object which resides on JBoss.

  | Properties props = new Properties();
  | props.put(Context.INITIAL_CONTEXT_FACTORY,"org.jnp.interfaces.NamingContextFactory");
  | props.put(Context.PROVIDER_URL,"jnp://localhost:1099");
  | Context ctx = new InitialContext(props);

Also, make sure that you add the jbossall-client.jar file (present in %JBOSS_HOME%/client folder) to the lib folder of your WAR in Tomcat.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4150148#4150148

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4150148

More information about the jboss-user mailing list