【我使用display table功能,但是使用其中的导出excel功能失败,以下是我的代码】
【jar包】:displaytag-1.2.jar
displaytag-export-poi-1.2.jar
【web.xml中的配置】:
<filter>
<filter-name>exportFilter</filter-name>
<filter-class>org.displaytag.filter.ResponseOverrideFilter</filter- class>
</filter>
引入 <%@ taglib uri="http://displaytag.sf.net" prefix="d" %>
【jsp页面代码】:
<h:page id="list_panel" width="100%" title="">
<d:table name="page.result" id="row" uid="row" export="true"
cellspacing="0" cellpadding="0" class="table">
<d:col style="width:45" class="display_centeralign" title="序号">
${row_rowNum+((page.pageNo-1)*page.pageSize)}
</d:col>
<d:col property="INOUT_STORAGE_ID" class="display_centeralign"
title="出入库记录单号" />
<d:col class="display_centeralign" title="设备名称">
<c:forEach items="${deviceList }" var="device">
<c:if
test='${row.DEVICE_ID == device.deviceId }'>${device.deviceName }
</c:if>
</c:forEach>
</d:col>
<d:col property="LENDER_USER_NAME" class="display_centeralign" title="出入库人"/>
<d:col property="INOUT_STORAGE_TIME" class="display_centeralign" title="日期"/>
<d:col class="display_centeralign" title="数量">
<c:if test='${row.INOUT_STORAGE_FLAG == 0 }'>${row.INOUT_STORAGE_IN_NUMBER }</c:if>
<c:if test='${row.INOUT_STORAGE_FLAG == 1 }'>${row.INOUT_STORAGE_OUT_NUMBER }</c:if>
</d:col>
<d:col class="display_centeralign" title="类型">
<c:if test='${row.INOUT_STORAGE_FLAG == 0 }'>入库</c:if>
<c:if test='${row.INOUT_STORAGE_FLAG == 1 }'>出库</c:if>
</d:col>
<d:col class="display_centeralign" title="操作">
<span class="display_centeralign" οnmοusemοve="this.style.color= '#ffae00'" οnmοuseοut="this.style.color= '#8090b4'" οnclick="toViewInOutStorage('${row.INOUT_STORAGE_ID}');">[查看]</span>
</d:col>
</d:table>
</h:page>
【页面上显示的结果】:
网站无法显示该页面
【查询那个导出excel的标签内容是】:
<a href="/app_njhw/app/property/inOutStorage/inOutStorageList.jsp?Z6578706f7274=1&dX16544Xe=2">
<span class="export excel">
文字 - Excel文件
===========================================我是一个分割线===================
请帮忙分析一下呢?谢谢!
【jar包】:displaytag-1.2.jar
displaytag-export-poi-1.2.jar
【web.xml中的配置】:
<filter>
<filter-name>exportFilter</filter-name>
<filter-class>org.displaytag.filter.ResponseOverrideFilter</filter- class>
</filter>
引入 <%@ taglib uri="http://displaytag.sf.net" prefix="d" %>
【jsp页面代码】:
<h:page id="list_panel" width="100%" title="">
<d:table name="page.result" id="row" uid="row" export="true"
cellspacing="0" cellpadding="0" class="table">
<d:col style="width:45" class="display_centeralign" title="序号">
${row_rowNum+((page.pageNo-1)*page.pageSize)}
</d:col>
<d:col property="INOUT_STORAGE_ID" class="display_centeralign"
title="出入库记录单号" />
<d:col class="display_centeralign" title="设备名称">
<c:forEach items="${deviceList }" var="device">
<c:if
test='${row.DEVICE_ID == device.deviceId }'>${device.deviceName }
</c:if>
</c:forEach>
</d:col>
<d:col property="LENDER_USER_NAME" class="display_centeralign" title="出入库人"/>
<d:col property="INOUT_STORAGE_TIME" class="display_centeralign" title="日期"/>
<d:col class="display_centeralign" title="数量">
<c:if test='${row.INOUT_STORAGE_FLAG == 0 }'>${row.INOUT_STORAGE_IN_NUMBER }</c:if>
<c:if test='${row.INOUT_STORAGE_FLAG == 1 }'>${row.INOUT_STORAGE_OUT_NUMBER }</c:if>
</d:col>
<d:col class="display_centeralign" title="类型">
<c:if test='${row.INOUT_STORAGE_FLAG == 0 }'>入库</c:if>
<c:if test='${row.INOUT_STORAGE_FLAG == 1 }'>出库</c:if>
</d:col>
<d:col class="display_centeralign" title="操作">
<span class="display_centeralign" οnmοusemοve="this.style.color= '#ffae00'" οnmοuseοut="this.style.color= '#8090b4'" οnclick="toViewInOutStorage('${row.INOUT_STORAGE_ID}');">[查看]</span>
</d:col>
</d:table>
</h:page>
【页面上显示的结果】:
网站无法显示该页面
【查询那个导出excel的标签内容是】:
<a href="/app_njhw/app/property/inOutStorage/inOutStorageList.jsp?Z6578706f7274=1&dX16544Xe=2">
<span class="export excel">
文字 - Excel文件
===========================================我是一个分割线===================
请帮忙分析一下呢?谢谢!