struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Varun Garg" <>
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.


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


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

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

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message