Hi,

I am newbi to Struts.  where should I define my database to make transations using 
struts.

Thanks and Best Regards,

-----Original Message-----
From: Jon.Ridgway [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 13, 2002 5:34 PM
To: 'Struts Users Mailing List'
Subject: RE: logic:iterate with EJB's, casting problem?


Hi Nicolas,

Looks like there may be several issues here. The type should be the fully
qualified class name (you have Artists, should be package.Arist?) Also if
Artist is itself an EJB you should consider changing your stateless session
bean to return a collection of ArtistValueObjects; your presentation tier
should not (generally) be dealing with EJBs directly. On a similar note you
might consider hiding your stateless session bean behind a BusinessDelegate.

Jon Ridgway.
 

-----Original Message-----
From: Struts Newsgroup [mailto:[EMAIL PROTECTED]] 
Sent: 13 May 2002 06:40
To: [EMAIL PROTECTED]
Subject: logic:iterate with EJB's, casting problem?

Subject: logic:iterate with EJB's, casting problem?
From: "Nicolas Parise" <[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]>

The contents of this email are intended only for the named addressees and
may contain confidential and/or privileged material. If received in error
please contact UPCO on +44 (0) 113 201 0600 and then delete the entire
e-mail from your system. Unauthorised review, distribution, disclosure or
other use of this information could constitute a breach of confidence. Your
co-operation in this matter is greatly appreciated. 

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



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

Reply via email to