Search Results

Search found 1 results on 1 pages for 'user1787209'.

Page 1/1 | 1 

  • how get attribute relation from another entity class Java Persistance API and show to JSP through servlet?

    - by user1787209
    I have 2 entities are entities meeting and meetingAgenda. I write code entity class (EJB) from database like this. public class Meeting implements Serializable { ...... @XmlTransient public Collection<MeetingAgenda> getMeetingAgendaCollection() { return meetingAgendaCollection; } public void setMeetingAgendaCollection(Collection<MeetingAgenda> meetingAgendaCollection) { this.meetingAgendaCollection = meetingAgendaCollection; } ....... } and entity class meeting agenda like this. ..... public class MeetingAgenda implements Serializable { .... public String getAgenda() { return agenda; } public void setAgenda(String agenda) { this.agenda = agenda; } .... } method getMeetingAgendaCollection is a relation from meeting entity . then, in my controller servlet i call EJB like this. public class ControllerServlet extends HttpServlet { @EJB private RapatFacadeLocal rapatFacade; public void init() throws ServletException { // store category list in servlet context getServletContext().setAttribute("meetings", rapatFacade.findAll()); } ...... i want to show data from table entities meeting and meetingAgenda...but i can't.. please help.. i write code in JSP page.. like this.. <c:forEach var="meeting" items="${meetings}"> <td> MeetingCode : ${meeting.meetingCode} </td> <td> Meeting : ${meeting.meeting} </td> <td> Agenda : ${meeting.getMeetingAgendaCollection} </td> </c:forEach> how do I display data Agenda using getMeetingAgendaCollection ???? thanks for your help.

    Read the article

1