解决使用displaytag时出现异常问题的方法
[1/12/05 13:07:54:238 CST] 16f2036b LookupUtil W org.displaytag.util.LookupUtil Exception: [.LookupUtil] Error looking up property "title" in object type "com.ztesoft.ds.application.web.bulletin.decorator.BulletinListDecorator"Cause: null
[1/12/05 13:07:54:276 CST] 16f2036b LookupUtil W org.displaytag.util.LookupUtil TRAS0014I: The following exception was logged java.lang.reflect.InvocationTargetException: java.lang.ClassCastException: java.lang.String
at com.ztesoft.ds.application.web.bulletin.decorator.BulletinListDecorator.getTitle(BulletinListDecorator.java:24)
原因是jsp页面中没有使用${}(el语法),如下:
<display:table name="${bulletinList}" class="OuterTable" decorator="com.ztesoft.ds.application.web.bulletin.decorator.BulletinListDecorator">
<display:column property="bulletinId" titleKey="morePage.seq" width="5%" align="center" class="ValueTd" headerClass="ValueTd"/>
</display:table>
当给bulletinList加上${}就好了
本文地址:http://www.45fan.com/a/question/73781.html