struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Gibert Ginestà <>
Subject Struts + EJB
Date Thu, 17 Jul 2003 17:15:32 GMT

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 

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.

Marc Gibert Ginestà               e-mail:
Cometa Technologies, S.L.         URL:
Telf.: 93 231 84 90               Fax: 93 245 93 43

View raw message