Subject: logic:iterate with EJB's, casting problem?
From: "Nicolas Paris�" <[EMAIL PROTECTED]>
 ===
Hi!

I have a problems, for displaying a collection of object retrieved
from a EJB (1.1).


In my action class, I retrieve a collection of Artists objects from
a Session EJB:


Collection coll = myRemoteSessionBeanInterface.getArtists();
request.setAttribute("coll",coll);

then in my JSP, I use de iterate tag to loop over my collection :


<logic:iterate id="element" name="coll" type="Artists">
<bean:write name="element" property="name"/><br>
</logic:iterate>


Here is the error that I have :

javax.servlet.ServletException: com.inprise.vbroker.rmi.CORBA.ObjectImpl


I was only be able to display my collection that way :

Iterator it = coll.iterator();

while (it.hasNext()) {
    out.println(((Artist)PortableRemoteObject.narrow(it.next(),
Artist.class)).getName());
}


I want to use the Struts logic:iterate tag, not the while loop, any ideas?




Nicolas Parise



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to