首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

Unable to find a value 有关问题

2011-12-03 
Unable to find a value 问题情况如下:HTML codec:forEach items${sessionScope.trainingList} vart

Unable to find a value 问题
情况如下:

HTML code
<c:forEach items="${sessionScope.trainingList}" var="trainingList">    <tr class=titletdbg>      <td width="84" height="21">      <c:out value="${trainingList['startTime'] }"/>      </td>      <td height="21" colspan="4">      <c:out value="${trainingList['collegeName'] }"/>      </td>      <td height="21">      <c:out value="${trainingList['courses'] }"/>      </td>      <td height="21">      <c:out value="${trainingList['CertorDegree'] }"/>      </td>    </tr>       </c:forEach>


添加进数据库时候,各个字段都允许为空,结果数据库里面是空的,但是取出来的时候。放到了List里面。现在就出错了。
Unable to find a value for "CertorDegree" in object of class "vo.file.TFileTraining" using operator "[]"

请问怎样处理这个……

[解决办法]
CertorDegree
你把这个改成certorDegree
相应的方法改成 getCertorDegree setCertorDegree
试试
[解决办法]
Unable to find a value for "CertorDegree" in object of class "vo.file.TFileTraining" using operator "[]" 
哎,命名规范。。。。
[解决办法]

[解决办法]
数据库的当然可以了,但是在java中变量命名有一定的规则,
很多时候会由于命名而出现一些找不到的错误,
java命名规则lz可以去google看看
[解决办法]
对,名称,JavaBean对名字要求是很严格的,只能用小写开头

热点排行