Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JSP and EJB

 
ROBINSON
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear all,
I am new to EJB and JSP. I want to call a EJB from JSP Client.
Can anybody help me to do a Program?
Thanks & Regards
ROBINSON
 
Johannes de Jong
tumbleweed
Bartender
Posts: 5089
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your user name (Robinson) does not comply with the JavaRanch's naming policy. Pse change it you wish to continue posting in our forums.
You also posted this in the wrong forum try the "Servlets and JSP's" fourm.
Good luck
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've moved this post to Servlets and JSPs for you.
 
vikinsa
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!,
Try this...
import that bean in your jsp like this with the other imports..(Here I have a bean named user)
<%@ page import = "user.*" %>
then get the initial context. I am afraid I don't have the code for getting it. I had in one of the files named EVUtil2.
InitialContext ctx = (InitialContext)EVUtil2.getInitialContext();
Look up the home
RegisterUserHome regUserHome = (RegisterUserHome)ctx.lookup("RegisterUserHome");
Create remote..
RegisterUser regUser = regUserHome.create() ;
call the method..(here MemberGroups)
VectormemGroups = regUser.MemberGroups(OrgID, userId);
use the data.

I know this may be a little confusing but the steps are really very helpful. I wish I could give the whole code based on Weblogic5.0. Follow the steps and search for the correct syntaxes. All the best.
Originally posted by ROBINSON:
Dear all,
I am new to EJB and JSP. I want to call a EJB from JSP Client.
Can anybody help me to do a Program?
Thanks & Regards
ROBINSON


------------------
Vikas Aggarwal
Technology Associate
http://www.vikinsa.com
 
ROBINSON
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Vikinsa,
Received your mail. I'll try as per your steps.

Thanks & Regards
ROBIN
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic