Note that there are some explanatory texts on larger screens.

plurals
  1. POhow get attribute relation from another entity class Java Persistance API and show to JSP through servlet?
    text
    copied!<p>I have 2 entities are entities meeting and meetingAgenda.</p> <p>I write code entity class (EJB) from database like this.</p> <pre><code>public class Meeting implements Serializable { ...... @XmlTransient public Collection&lt;MeetingAgenda&gt; getMeetingAgendaCollection() { return meetingAgendaCollection; } public void setMeetingAgendaCollection(Collection&lt;MeetingAgenda&gt; meetingAgendaCollection) { this.meetingAgendaCollection = meetingAgendaCollection; } ....... } </code></pre> <p>and entity class meeting agenda like this. .....</p> <pre><code>public class MeetingAgenda implements Serializable { .... public String getAgenda() { return agenda; } public void setAgenda(String agenda) { this.agenda = agenda; } .... } </code></pre> <p>method getMeetingAgendaCollection is a relation from meeting entity . then, in my controller servlet i call EJB like this.</p> <pre><code>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()); } ...... </code></pre> <p>i want to show data from table entities meeting and meetingAgenda...but i can't.. please help.. </p> <p>i write code in JSP page.. like this.. </p> <pre><code> &lt;c:forEach var="meeting" items="${meetings}"&gt; &lt;td&gt; MeetingCode : ${meeting.meetingCode} &lt;/td&gt; &lt;td&gt; Meeting : ${meeting.meeting} &lt;/td&gt; &lt;td&gt; Agenda : ${meeting.getMeetingAgendaCollection} &lt;/td&gt; &lt;/c:forEach&gt; </code></pre> <p><strong>how do I display data Agenda using getMeetingAgendaCollection ????</strong></p> <p>thanks for your help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload