[ 
https://issues.apache.org/jira/browse/MYFACES-4214?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16459122#comment-16459122
 ] 

Kyle Stiemann commented on MYFACES-4214:
----------------------------------------

[~tandraschko], we ended up fixing this in the bridge since it's not really a 
bug in the JSF implementations (since the requirements are only for the Portlet 
Spec). I can't provide a patch for this any time soon, so feel free to either 
close this as "Won't Fix" or leave the issue open in hopes that I'll be able to 
provide a patch in the future.

> The wrong content type of "text/html" is set for Ajax responses
> ---------------------------------------------------------------
>
>                 Key: MYFACES-4214
>                 URL: https://issues.apache.org/jira/browse/MYFACES-4214
>             Project: MyFaces Core
>          Issue Type: Improvement
>          Components: General, Portlet_Support
>    Affects Versions: 2.2.12, 2.3.1
>            Reporter: Kyle Stiemann
>            Assignee: Thomas Andraschko
>            Priority: Minor
>
> h2. Steps to reproduce:
> # Clone the 
> [wrong-content-type-ajax-excecute-all-reproducer|https://github.com/stiemannkj1/wrong-content-type-ajax-excecute-all-reproducer]
>  project:
> {code}
>  git clone 
> https://github.com/stiemannkj1/wrong-content-type-ajax-excecute-all-reproducer.git
> {code}
> # Build the project:
> {code}
>  cd wrong-content-type-ajax-excecute-all-reproducer && mvn clean package -P 
> myfaces
> {code}
> # Deploy the project to Tomcat:
> {code}
>  cp target/*.war 
> $TOMCAT_HOME/webapps/wrong-content-type-ajax-excecute-all-reproducer.war
> {code}
> # Navigate to the deployed webapp at 
> [http://localhost:8080/wrong-content-type-ajax-excecute-all-reproducer/|http://localhost:8080/wrong-content-type-ajax-excecute-all-reproducer/].
> # Note that the _External Context Calls:_ show that 
> \{{setResponseContentType("text/html")}} was correctly called before the 
> first call to \{{getResponseOutputWriter()}}.
> # Click the _Execute (default) Ajax Request_ button.
> # Note the _External Context Calls:_.
> # Click the _Execute @all Ajax Request_ button.
> If the bug still exists, the _External Context Calls:_ will show that 
> \{{setResponseContentType("text/html")}} was *incorrectly* called before the 
> first call to \{{getResponseOutputWriter()}} during Ajax requests.
> If the bug is fixed, the _External Context Calls:_ will show that 
> \{{setResponseContentType("text/xml")}} was called immediately before the 
> first call to \{{getResponseOutputWriter()}}.
> h2. Additional Information:
> This issue does not affect Servlets but it does affect portlets which do not 
> allow changing the content type after the first call to 
> {{ExternalContext.getResponseOutputWriter()}} (Portlet Spec 3.0 Section 
> _15.5.1 Content Type_):
> {quote}
> The {{setContentType}} method must be called before the {{getWriter}} or 
> {{getPortletOutputStream}} methods. Otherwise, the method will have no effect.
> {quote}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to