jsp项目中如何配置显示标签?
WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/apache/commons/lang/UnhandledException
jsp项目中如何配置显示标签?
WARNING: StandardWrapperValve[jsp]: PWC1406: Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: org/apache/commons/lang/UnhandledException
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
<display:table uid="ratingAdjustmentHistoryUID" name="${ratingAdjustmentHistoryForm.ratingAdjustmentHistoryQOList}"
requestURI="/ratingAdjustmentHistoryPre.do?method=searchRatingTracker" excludedParams="method"
decorator="com.ford.mpl.superg.decorator.RatingAdjustmentHistoryTableDecorator" keepStatus="true" style="width:100%">
<%@include file="/jsp/include/displaytag.jsp"%>
<display:column property="shipSite" title="RAHSiteCode" sortable="true" />
<display:column property="ratingMonth" title="RAHRatingMonth" sortable="true" />
<display:column property="prior" title="RAHPrior" sortable="true" />
<display:column property="revised" title="RAHRevised" sortable="true" />
<display:column property="adjustments" title="RAHAdjustments" sortable="true" />
<display:column property="comments" title="RAHComments" sortable="true" />
<display:column property="lastUpdated" title="RAHLastUpdated" sortable="true" />
<display:column property="lastUpdatedCDSID" title="RAHLastUpdatedCDSID" sortable="true" />
</display:table>
RatingAdjustmentHistoryTableDecorator
- 它用于装饰器
将 displaytag.jar 文件粘贴到您的位置*YourApplicationName*/Webcontent/WEB-INF/lib/
displaytag-1.2.jar`
display:column
用于显示您的列
property
用于在您的 java 文件中定义的 bean 名称
title
用于显示表的标题
sortable
用于对单个列进行排序或不
name
用于使用表单名称获取列表
uid
它是使用的唯一标识符将表存储为对象
keepStatus
用于维护表的状态,直到会话到期
如果您仍然面临这个问题,请告诉我。谢谢。
对于显示标签,web.xml 中不需要任何配置
显示标签用于网格数据中的分页排序
只放了三个 jar (1)displaytag-1.2,(2)displaytag-export-poi-1.2,(3)displaytag-portlet-1.2
并在您的 jsp 页面中编写标签库,例如:
<%@ taglib uri="http://displaytag.sf.net" prefix="display"%>
您的网格代码:
<display:table name="sessionScope.yourListname" pagesize="5" sort="list" cellspacing="10" cellpadding="5">
<display:column property="var1" title="Title1" sortable="true" />
<display:column property="var2" title="Title2" sortable="true" />
<display:column property="var3" title="Title3" sortable="true" />
</display:table>
如需更多了解,请点击链接
http://viralpatel.net/blogs/struts-displaytag-tutorial-sort-pagination-data-displaytag-struts/