浏览 1068 次
该帖已经被评为隐藏帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-11-12
#foreach($cust in $customers) <tr> <td> <a href="dispalyCourse.htm?id={$cust.id}"> ${cust.id} </a> </td> <td>$cust.name</td> </tr> #end </table> 错误提示: 08:43:32,156 WARN [VelocityEngine] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ticket/test.vm [line 28,column 11] : ${cust.id} is not a valid reference. 08:43:32,156 WARN [VelocityEngine] org.apache.velocity.runtime.exception.ReferenceException: reference : template = ticket/test.vm [line 31,column 13] : $cust.name is not a valid reference. DAO: public List selectCustomer(){ return getHibernateTemplate().find(" from Customer");} 调用: public ModelAndView testok(HttpServletRequest request, HttpServletResponse response) { Map model = new HashMap(); model.put("customers",this.getCustomerdao().selectCustomer()); return new ModelAndView("ticket/test",model); } 为什么提示错误呢?? 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |