Ahh i forgot something very important for your web application using the
session/entity bean in question (web.xml)...

You have to define ejb-refs for the beans you want to use, or you will not
find the bean from the JSP...

Here is an example of an ejb-ref you can put in the bottom of your file.....

<ejb-ref>
  <ejb-ref-name>ejb/SomeEntity</ejb-ref-name>
  <ejb-ref-type>Entity</ejb-ref-type>
  <home>com.something.ejb.entity.SomeEntityHome</home>
  <remote>com.something.ejb.entity.SomeEntity</remote>
</ejb-ref>

Klaus 

-----Opprinnelig melding-----
Fra: Sven van 't Veer [mailto:[EMAIL PROTECTED]]
Sendt: 13. november 2000 12:14
Til: Orion-Interest
Emne: Re: Newbie Q: Can't find bean?




"Sean P. McNamara" wrote:
> 
> 
> In addition to the specification, I have a copy of the
> Monson-Haefel book on Enterprise JavaBeans, but there is virtually no
> mention of JSP-EJB interaction.  I also spent some time earlier today
> browsing JSP-centric books in the local bookstore, and found little
> mention (usually about 1 paragraph) regarding EJB's.

I agree with you, it's hard to find information on that subject. I've
been reading this list and the sun J2EE interest for a couple of months
now and am almost ready doing my first complete EJB / JSP app.

The thing I found is as follows. It seems that by using a tag-lib you
can use your EJB directly in your jsp's, but the general opinion in this
list and others is that the way to do such things is by creating
'common' java beans or classes to use with the <jsp:useBean> tags in the
jsp. These classes than refrence stateful or stateless session beans,
which in turn reference the entity beans.

sven
-- 
============================================================================
==========
Sven E. van 't Veer                                          
http://www.cachoeiro.net
Java Developer
[EMAIL PROTECTED]
============================================================================
==========

Reply via email to