2012-12-11 52 views
2

我正在開發一個彈簧mvc的portlet。 我使用的顯示標籤庫導出excel數據,CSV,XML等顯示標籤庫彈簧mvc

我正在listining像上面真值,

  1. 廣告Soyad(列名)

  2. ERDI卡亞

    3.serkan gurbuz

我的jsp FIL E本,

<%@ page buffer = "16kb" %> 
<%@ taglib prefix="portlet" uri="http://java.sun.com/portlet_2_0"%> 
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%> 
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%> 
<%@ page contentType="text/html" isELIgnored="false"%> 
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> 
<%@taglib uri="http://www.springframework.org/tags" prefix="spring" %> 
<%@ taglib prefix="display" uri="http://displaytag.sf.net" %> 
<%@ taglib prefix="h" uri="http://java.sun.com/jsf/html" %> 



<display:table name="userList" export="true" > 

    <display:column property="ad" title="ID" sortable="true" headerClass="sortable" /> 
    <display:column property="soyad" sortable="true" headerClass="sortable" /> 



</display:table> 

當我點擊的Excel,CSV或XML我收到錯誤

無法返回出口數據之前重置響應。您沒有使用導出過濾器。確保在display:table之前沒有使用其他jsp標籤,或者參考displaytag文檔瞭解如何配置導出過濾器(需要j2ee 1.3)。

我還沒有解決2天tih error.i使用顯示1.2罐和其他所需的罐子。

回答

0

您需要在您的web.xml中配置導出過濾器。這將有助於將內容轉換爲預期的格式。 閱讀以下鏈接以瞭解詳細信息。

Export filter? What's that?