I have entity class Publication. It connected with entity class Teacher as ManyToMany.
Here's part of Publication class
// create connectivity with table Teacher public Set<Teacher> teachers; @ManyToMany @JoinTable(name = "Bridge2", joinColumns = @JoinColumn(name = "PublicationId"), inverseJoinColumns = @JoinColumn(name = "TeacherId")) public Set<Teacher> getTeacher() { return teachers; } public void setTeacher(Set<Teacher> teachers) { this.teachers = teachers; } I select publication from database and pass it to JSP page. At JSP page I try to view all teachers but always get exception Property 'teachers' not found on type org.irs.entities.Publication.
Here's part of JSP file
<td> <!-- view all teachers --> <c:forEach var="t" items="${publication.teachers}"> ${t.teacherFullName}<br/> </c:forEach> </td> If anyone knows the reason of this problem, I'll be gratful for help.