This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I am working on JBuilder6 and JBoss-3.0.0. My jndi.properties is -----------------------java.naming.factory.initial=org.jnp.interfaces.Na ingContextFactory java.naming.provider.url=localhost:1099 java.naming.factory.url.pkgs=org.jboss.naming rg.jnp.interfaces ----------------------- Then in my standalone java app, I wrote: Context context = new InitialContext() --> it run well but in my JSP, I got an error: javax.naming.NoInitialContextException: Cannot instantiate class: org.jnp.interfaces.NamingContextFactory [Root exception is java.lang.ClassNotFoundException: org.jnp.interfaces.NamingContextFactory] ----------------------- Anyone can tell me why I got that error ? Thanks
I recommend you check your CLASSPATH. Not the one you started from, but the one JBoss is actually using. They're frequently not the same, as many of us have discovered, to our sorrow. In fact, many appservers have 4 or 5 or even more internal classpaths, depending on what part of the system you're working with.
An IDE is no substitute for an Intelligent Developer.
You can get context in a JSP as you do using Java App. Becoz the JSP is convereted into Servlet. So it doesn't matter if u r using JSP or a Java application. It is all the same. But I think it is not good to call EJB from JSP. We should be using JSP only for the presentation and it should be free of any business logic or interaction with EJB I think it will be great if you can learn about these design patterns 1) MVC 2) Session Facade 3) Business Delegate Lov Siva