struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Garg" <varun_g...@yahoo.com>
Subject RE: Struts + EJB
Date Thu, 17 Jul 2003 17:30:27 GMT
I would call the SessionEJB from the actions and copy over the contents
that need to be displayed either in the ActionForm or a VO/DTO in the
form and then use that to display the information in the JSP.

What is the SessionEJB returning you?? It should be some object
serializable and that should be able to fit in the ActionForm.

Varun

-----Original Message-----
From: Marc Gibert Ginestà [mailto:marcg@cometatech.com] 
Sent: Thursday, July 17, 2003 12:16 PM
To: 'Struts Users Mailing List'
Subject: Struts + EJB


Hi!

We're starting a project based on Struts with EJBs for the business 
logic and JSPs for the view.

So far, we've successfully coded Actions that call stateful Session EJBs

that talk to Entity EJBs.

The problem we have is on the view (JSPs). How is the JSP supposed to 
talk to the Session EJB instantiated by the Action class?

One solution we see is to put the instantiated Session EJB in the HTTP 
session and then call its getters from the JSP. This works.

Another solution would be to code a sort of DTO between the Action and 
the EJB so the Action talks to the DTO, the DTO to the EJBs, and then 
the JSP could do a jsp:useBean on the DTO. This seems a lot overkill and

bloat.

I've seen on some pages talk about some Struts taglibraries specific to 
EJB, but couldn't find them. Would these solve our problems? Where are
they?

Is there a better way of doing this?
Has anybody had the same doubt?

Thanks in advance.

-- 
Sincerely,
Marc Gibert Ginestà               e-mail: marcg@cometatech.com
Cometa Technologies, S.L.         URL: http://www.cometatech.com
Telf.: 93 231 84 90               Fax: 93 245 93 43



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message