File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes JSP & EJB compatibility Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "JSP & EJB compatibility" Watch "JSP & EJB compatibility" New topic
Author

JSP & EJB compatibility

r venkat
Greenhorn

Joined: Jan 09, 2001
Posts: 8
hello friends,
i would like to know how i can connect my ejbean in my JSP?
can any one help.
-ven
Dustin Marx
Ranch Hand

Joined: Mar 06, 2001
Posts: 40
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

Joined: Jan 09, 2001
Posts: 8
i'll give it a try thanks
post your result too
Desai Sandeep
Ranch Hand

Joined: Apr 02, 2001
Posts: 1157
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
vgdesai@bom3.vsnl.net.in

  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).]


<b>Sandeep</b> <br /> <br /><b>Sun Certified Programmer for Java 2 Platform</b><br /> <br /><b>Oracle Certified Solution Developer - JDeveloper</b><br /><b>-- Oracle JDeveloper Rel. 3.0 - Develop Database Applications with Java </b><br /><b>-- Object-Oriented Analysis and Design with UML</b><br /> <br /><b>Oracle Certified Enterprise Developer - Oracle Internet Platform</b><br /><b>-- Enterprise Connectivity with J2EE </b><br /><b>-- Enterprise Development on the Oracle Internet Platform </b>
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JSP & EJB compatibility
 
Similar Threads
JSP Import statement
single thread
how to complie jsp
compile jsp with tomcat
how to read file