[ 
http://issues.apache.org/jira/browse/MYFACES-376?page=comments#action_12319819 
] 

Galen Dunkleberger commented on MYFACES-376:
--------------------------------------------

I'm using Facelets with MyFaces and I think this fix is causing me some 
trouble. The problem is that FireFox has an accept header that looks like 
this...
text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5

MyFaces HtmlRenderKitImpl  has the following supported content types.
[text/xml, application/xml, application/xhtml+xml, text/html, text/plain, 
image/png, */*]

and the RenderKit just goes through and picks the first match. The problem for 
me is it's picking application/xhtml+xml 
but MyFaces isn't rendering valid xhtml...so really what I want it to pick is 
text/html.  I went in and removed all the xml 
content types ( XHTML_CONTENT_TYPE, APPLICATION_XML_CONTENT_TYPE and 
TEXT_XML_CONTENT_TYPE)
from the supportedContentTypeArray in the createResponseWriter method and I 
could once again display my xhtml facelets page. 

Do you think these content types could be removed until MyFaces really supports 
them? 



> HTML Renderkit doesn't choose correct ContentType
> -------------------------------------------------
>
>          Key: MYFACES-376
>          URL: http://issues.apache.org/jira/browse/MYFACES-376
>      Project: MyFaces
>         Type: Bug
>   Components: JSF 1.1
>     Versions: 1.0.9 beta
>  Environment: Tomcat, FireFox/Mozilla Browser
>     Reporter: Jacob Hookom
>     Assignee: Martin Marinschek
>     Priority: Critical
>      Fix For: Nightly Build

>
> The contract between ViewHandler and RenderKit for creating a ResponseWriter 
> is that the ViewHandler should suggest a list of supported contentTypes.  It 
> is the RenderKit's job to pick the appropriate one based on it's output-- not 
> just any of them.
> In the case of Firefox, the first item it sends is 'text/xml, ....', the 
> HtmlRenderKit in MyFaces just says, use the first item returned, so the 
> response is set to be contentType of 'text/xml'.
> This causes issues since the browser gets a response, renders it, but treats 
> the content with comments <!-- --> as XML-- so that means the css isn't used, 
> and commented JavaScript isn't seen.
> This is a major blocker.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira

Reply via email to