aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Context Object in Servlet not finding property values Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Context Object in Servlet not finding property values" Watch "Context Object in Servlet not finding property values" New topic
Author

Context Object in Servlet not finding property values

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
I'm having an odd problem I was hoping someone could shed a little light on.

I've created and deployed my EJB's and created a test client as a stand-alone java app and it connects fine and grabs the info.

But I'm trying to now convert the operation into a servlet so I can test in that manner.

I'm using JDeveloper as my IDE.

But when I try to set up my context in the servlet like this:

Properties props = new Properties();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "jnp://10.29.6.93:1099");
props.put(Context.URL_PKG_PREFIXES, "org.jboss.naming rg.jnp.interfaces" );

It tells me that "INITIAL_CONTEXT_FACTORY is not found in class javax.naming.Context".

And when I do a Context. that option is not listed.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Context Object in Servlet not finding property values