On 04.11.10 13:13, "Markus Pielmeier" <[email protected]>
wrote:

>> >I've also tries to set the content type in the JSP manually:
>> >---snip---
>> ><% response.setContentType("text/css; charset=utf-8"); %>
>> >---snip---
>> >This doesen't work either.
>>
>> Both the @page directive and the response.setContentType() should work.
>>
>> Are you sure you inspected that using a tool like curl? I remember
>> browsers sometimes showing text/html for all text files if you view them
>> directly in the browser...
>I'm pretty sure that my response contains the content type text/html
>instead of text/css. That is because I see the content type text/html
>in google chrome developer tools and in firefox firebug. Additionally
>google chrome and firefox don't interpret the CSS as it's delivered
>with the content type text/html. So my page is rendered without CSS
>styles.
>
>> > To me it seems like (maybe Sling)
>> >overwrites the content type after my JSP is fully rendered. Can this
>> >be the case?
>>
>> I don't think so...
>The reason for my assumption is the behavior on errors within the JSP.
>I get a text/css content type when an exception occurs after I've set
>the content type to text/css within the JSP. So I guess that the
>content type is somehow overwritten after the processing of my JSP has
>ended.

Could you provide more information, eg. how does the content and the
sling:resourceType look like, and what else is in the jsp that might lead
to this issue.

Regards,
Alex

-- 
Alexander Klimetschek
Developer // Adobe (Day) // Berlin - Basel




Reply via email to