how to express many to many items in jstl?


I am using spring/hibernate annotation to do crud.

Citation class{
String citationName;
 Collection<Author> authorCollection;

Author class{
String lastName;
String middelName;

From my listcitation.jsp, I am trying to display citation records.
 <td><c:out value="${reference.citationName}" /></td>    
 <td><c:out value="${reference.authorCollection.lastName}" /></td>   <=== if I do this it bugs out.

Any idea?
Who is Participating?
Don't you need an index on your authorCollection?
dkim18Author Commented:
I guess you do something like this  but I am getting this error.

Someone mentioned about use fetch=.
Another mentioned creating entitymanage (which I don't know how to use it)

Any suggestions?

org.hibernate.LazyInitializationException: failed to lazily initialize a collection of role: org.battelle.bcho.refmgmt.domain.Referenceitem.authorList, no session or session was closed
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.