I'm running JBoss 3.0.1 with Tomcat 4.0.4 bundle. I have successfully deployed a EJB to Jboss and created 2 clients (java & JSP client). For some reasons, I'm able to run the java client but when I try the JSP client (served by Tomcat) I get this error message javax.servlet.ServletException: Name greetings is not bound in this Context Below is the code for the 2 clients & web.xml <----------- jsp client --------------> <%@ page import="javax.naming.*, java.util.*, java.util.Hashtable, javax.rmi.PortableRemoteObject, com.stardeveloper.ejb.session.*"%> <% long t1 = System.currentTimeMillis(); InitialContext ctx = new InitialContext(); Object ref = ctx.lookup("ejb/First"); FirstHome home = (FirstHome) PortableRemoteObject.narrow (ref, FirstHome.class); First bean = home.create(); String time = bean.getTime(); bean.remove(); ctx.close(); long t2 = System.currentTimeMillis(); %> <html> <head> <style>p { font-family:Verdana;font-size:12px; }</style> </head> <body> <p>Message received from bean = "<%= time %>".<br>Time taken : <%= (t2 - t1) %> ms.</p> </body> </html>
<----------- java client -------------> import javax.naming.*; import com.stardeveloper.ejb.session.*; import java.util.Hashtable; import javax.rmi.PortableRemoteObject; import com.stardeveloper.ejb.session.*; class firstEJBclient { public static void main(String[] args) { try { long t1 = System.currentTimeMillis(); InitialContext ctx = new InitialContext(); System.out.println("Got CONTEXT");