If you're using taglibs, the best way is to use the library that comes with
Orion called ejbtags.jar

Then within your jsp you do:

<%@ taglib uri="../ejbtags.jar" prefix="ejb" %>

<ejb:home id="myhome" type="com.ejb.myejbhome.class"
location="java:comp/env/my/ejbs/location" />

Then within your page you can do things like <% myhome.create(blah); %>

Also useful when combined with the iterate tag from the util library.

<util:iterate id="mybean" type="com.ejb.myejbbean.class" collection="<%=
myhome.findAll %>">
        <%= mybean.getName() %>
</util:iterate>

Hope this helps,

Mike

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Joseph B.
> Ottinger
> Sent: Friday, 31 March 2000 5:08
> To: Orion-Interest
> Subject: Accessing EJB from JSP (again)
>
>
> I'm in the process of writing a full J2EE application on the web. I'm
> trying to show off the technology, and explain every step of the way,
> including full source and reasons where, um, I know what the reasons are.
>
> The URL for this nascent project
> is: http://cupid.suninternet.com/phonelist/
>
> Note that I'm learning as I go, and I'm sure to do things incorrectly. I'm
> trying to be as open as I can with the entire source, so that for one
> thing, reviewers can see what I'm doing wrong, and for another thing,
> other J2EE application developers will be able to use this as a sort of
> checklist and example project.  Feel free to review it, and make any
> suggestions/feature requests you would like to. Again, the purpose is to
> have a project that uses most of this technology, where appropriate, so
> everyone can learn.
>
> That said, I have run into yet another roadblock. I've got an entity bean
> set up, but... how do I get a JSP page to access it? I've seen a coupel of
> ways so far, but they assume I have experience in areas I don't think I
> have experience in. JSP doesn't bother me; taglibs don't bother
> me; implicit documentation (which is all I've found) bothers me. So here
> am I, my JSP engine all revved up, and no place to go. Are there any
> pointers, explained examples, people willing to walk through it with me
> out there?
>
> -----------------------------------------------------------
> Joseph B. Ottinger               [EMAIL PROTECTED]
> http://cupid.suninternet.com/~joeo      HOMES.COM Developer
>
>
>


Reply via email to