• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

JSP & EJB compatibility

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello friends,
i would like to know how i can connect my ejbean in my JSP?
can any one help.
-ven
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not sure if this will answer what you are asking, but I'll give it a try.
The application server normally provides an EJB container and a JSP container and allows for you to change appropriate settings to let EJBs and JSPs communicate with one another. At that point, you can have Java directly in the JSP (or in a JavaBean used by the JSP) access EJBs as normal Java code does (getting the home interface, etc.).
 
r venkat
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i'll give it a try thanks
post your result too
 
Ranch Hand
Posts: 1157
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dustin, is absolutely correct
Venkat, you would need to remember that JavaBean is acting as a client to your EJB, for your JSP.You will have to get the instance of the HomeObject to create an instance of EJBObject in your JavaBean later in your code, to access the EJB.
The following sample code might be helpful to you.

Regards,
Sandeep Desai
[email protected]

  1. Sun Certified Java Programmer Scored 93 per cent
  2. Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java Scored 56 out of 59
  3. IBM Enterprise Connectivity with J2EE Scored 72 per cent
  4. Enterprise Development on the Oracle Internet Platform Scored 44 out of 56

  5. [This message has been edited by Desai Sandeep (edited April 27, 2001).]
 
reply
    Bookmark Topic Watch Topic
  • New Topic