reset password
Author Message
nehabhatt
Posts: 9
Posted 10:48 May 20, 2009 |

Hello,

       I am getting error while submitting comments to the database. Comments are stored in database when i click submit button but it given an error on comment.jsp page where i am displaying comments.

org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/blog/comment.jsp at line 40

37: </security:authorize>

38:

39: <br/>

40: <c:forEach var="entry" items="${comment}" >

41: <br/>

42: ${entry.content}

43: <br/>

 

javax.servlet.ServletException: javax.servlet.jsp.JspTagException: Don't know how to iterate over supplied "items" in &lt;forEach&gt;

 

Here on jsp page i have included  <%@ include file="/WEB-INF/jsp/include/taglib.jspf"%>

Attachments:
cysun
Posts: 2935
Posted 13:56 May 20, 2009 |

The error message means that the "comment" object is not a collection. Check your controller and see if you've got the wrong name for the model object (e.g. maybe it should be "comments").

And btw, next time please use jpg or png format if you want to upload screenshots. BMP images are too big and take a long time to download.

nehabhatt
Posts: 9
Posted 14:32 May 20, 2009 |

Thnkyou professor.

error solved.

Next time I will upload jpg file.