struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Gibert Ginestà <ma...@cometatech.com>
Subject Struts + EJB
Date Thu, 17 Jul 2003 17:15:32 GMT
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

Mime
View raw message