Discussions

EJB programming & troubleshooting: Connecting EJB with JSP client

  1. Connecting EJB with JSP client (2 messages)

    Hi there,
        Somebody let me know what are rules and regulations to
    connect a jsp client with EJB. Where can a get a sample JSP client for a BMP bean.
                         Regards,
                            Rahul
  2. Connecting EJB with JSP client[ Go to top ]

    follow the code which goes here

    ------here this is the JSP tags what i assume here that u r comfortable with JSP.

    <%
        try
        {
    Context ctx = getInitialContext();
    Object obj = ctx.lookup("Your Beans jndi name");
    HomeInterface home = (HomeInterface)PortableRemoteObject.narrow(obj,HomeInterface .class);
    now on this home object u can get the reference to the remote and invoke the methods on that object
    update me back if problem arises.
    cheers
    manoj


    %>
  3. Connecting EJB with JSP client[ Go to top ]

    Hi manoj,
         Thanx.