Jsf Primefaces文件下载JavaScript错误
我正在尝试使用Primefaces文件下载组件下载一个文件。不幸的是,它不起作用。我只得到一个Javascript错误“[window]响应不包含XML数据” 我将JSF2.1.6与Primefaces 3.2一起使用,IceFaces推送版本2.0.2用于推送数据,一些Spring函数与Spring版本3.1.0一起使用。都在Tomcat 6.0.33上运行 我的xHtml代码片段Jsf Primefaces文件下载JavaScript错误,jsf,primefaces,icefaces,Jsf,Primefaces,Icefaces,我正在尝试使用Primefaces文件下载组件下载一个文件。不幸的是,它不起作用。我只得到一个Javascript错误“[window]响应不包含XML数据” 我将JSF2.1.6与Primefaces 3.2一起使用,IceFaces推送版本2.0.2用于推送数据,一些Spring函数与Spring版本3.1.0一起使用。都在Tomcat 6.0.33上运行 我的xHtml代码片段 <?xml version="1.0" encoding="UTF-8"?> <!DOCTYP
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:p="http://primefaces.org/ui">
<h:body>
<p:layout>
...
<p:layoutUnit id="east" ... >
<h:form id="eForm">
<p:dataTable ... >
...
<p:row >
<p:column style="font-weight: bold;">Attach 1:</p:column>
<p:column>
<p:commandLink id="attach1" value="Download" ajax="false" immediate="true">
<p:fileDownload value="#{data.file}" />
</p:commandLink>
</p:column>
</p:row>
</p:dataTable>
</h:form>
...
</p:layout>
</h:body>
FireBug的错误
[window] the response does not contain XML data bridge...9208334 (Zeile 1217)
[window] Error [status: emptyResponse code: 200]: An empty response was received from the server. Check server error logs.
Tomcat日志中没有错误
编辑
冰面是个问题。删除所有Icefaces LIB下载工作正常。但是没有IceFaces没有Push,所以。如果在getFile方法中设置断点,文件==null吗
问题可能是你的类构造得不好,Primefaces和IcePush并不总是一起工作。从我的项目中删除IceFaces推送使下载工作正常,但没有推送
所以我决定自己写推送,只用Primefaces 文件!=空,所以这不是问题所在
[window] the response does not contain XML data bridge...9208334 (Zeile 1217)
[window] Error [status: emptyResponse code: 200]: An empty response was received from the server. Check server error logs.