调用javabean的getId方法返回null
<% Comment c=(Comment)request.getAttribute("comment");%>
<h2>修改评论</h2>
<form id="form1" name="form1" method="post" action="/blog/servlet/CommentServlet">
<input type="hidden" name="id" value="<%=c.getId() %>" />
得到的<%=c.getId() %>值是null,在javabean Comment中有getId方法
而<%=c.getUsername()%>能得到值,也就是说只有调用getId()时,返回值为null,不知道为什么?