Deepak,
here is sample code to call
EJB from JSP. Accessing EJB from JSP is not a good practise. Check this URL for multi-tiered applications
Properties h = new Properties();
h.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
h.put(Context.PROVIDER_URL, "t3://localhost:7001");
h.put(Context.SECURITY_PRINCIPAL, user);
h.put(Context.SECURITY_CREDENTIALS, password);
Context ctx = new InitialContext(h);
Object o = ctx.lookup("ejb/myejb");// jndi name for your ejb
Mytesthome intf = (Mytesthome) PortableRemoteObject.narrow(o,Mytesthome.class);// your ejb home class