无法设置内容类型。已提交响应(jsf、primefaces)

无法设置内容类型。已提交响应(jsf、primefaces),jsf,primefaces,rad,websphere-portal,websphere-8,Jsf,Primefaces,Rad,Websphere Portal,Websphere 8,我试图在p:对话框中加载一些数据,但无法设置内容类型。响应已提交错误,且对话框中的数据未显示。。此外,selectedGift值始终为空 这是我的xhtml。。有什么想法吗 好吧,差不多4天后我发现了问题所在。。 问题是我正在使用RAD8.5和WebSpherePortal8.0。。在创建我的portlet时,它是在JSR168上创建的,因此portlet.xml如下 http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd id=com.

我试图在p:对话框中加载一些数据,但无法设置内容类型。响应已提交错误,且对话框中的数据未显示。。此外,selectedGift值始终为空

这是我的xhtml。。有什么想法吗


好吧,差不多4天后我发现了问题所在。。 问题是我正在使用RAD8.5和WebSpherePortal8.0。。在创建我的portlet时,它是在JSR168上创建的,因此portlet.xml如下

http://java.sun.com/xml/ns/portlet/portlet-app_1_0.xsd id=com.ibm.faces.portlet.FacesPortlet.2a8361a544>

正如您所看到的,它使用模式版本1.0

而当我把它改成

http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd id=com.ibm.faces.portlet.FacesPortlet.2a8361a544>

它工作得非常好


我希望它能帮助别人。。整个问题是portlet版本与AJAX类请求不兼容…

通常此异常是由于某些AJAX调用中以前的异常造成的。你能在显示服务器日志之前检查一下服务器日志中是否有异常吗?不,我只有这些。。[4/28/14 15:08:38:006 GMT+02:00]00000084 SystemOut O 2014-04-28 15:08:38调试请求LogWrapper:50-设置区域设置::en[4/28/14 15:08:38:020 GMT+02:00]00000084 ServletExtern E无法设置内容类型。已作出答复
    <h:form id="giftForm">

        <p:dataGrid var="gift" value="#{AvailableGiftsView.gifts.giftType}" columns="3"  
    rows="12" >  

    <p:panel header="#{gift.nameAr}" style="text-align:center">  
        <h:panelGrid columns="1" style="width:100%">  


            <h:outputText value="#{gift.descriptionAr}" />  
            <p:commandLink  update=":giftForm:giftDetail" onclick="giftDialog.show()" title="View Detail">  
                <p:graphicImage value="#{gift.photoUrl}"/>   
                <f:setPropertyActionListener value="#{gift}"   
                        target="#{AvailableGiftsView.selectedGift}" />  
            </p:commandLink>  

        </h:panelGrid>  
    </p:panel>  

</p:dataGrid>  

 <p:dialog id="dlg" header="Gift Detail" widgetVar="giftDialog" modal="true">  
    <h:outputText value="Resistance to PrimeFaces is futile!" />  
    <p:outputPanel id="giftDetail" style="text-align:center;"> 
     <h:panelGrid  columns="2" cellpadding="5">  
            <h:outputLabel for="giftName" value="Gift Name " />  
            <h:outputText id="giftName" value="#{AvailableGiftsView.selectedGift.name}" />  

            <h:outputLabel for="costPoints" value="Points: " />  
            <h:outputText id="costPoints" value="#{AvailableGiftsView.selectedGift.pointsCost}" />  

            <h:outputLabel for="description" value="Description: " />  
            <h:outputText id="description" value="#{AvailableGiftsView.selectedGift.name}"/>  
        </h:panelGrid> 
    </p:outputPanel> 
</p:dialog>  
    </h:form>

</f:view>
</h:body>