You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Wouter Westendorp <w....@vpro.nl> on 2004/06/23 18:00:19 UTC
XML serializer returns wrong mime-type with JSP Generator
Hi all,
I use the following sitemap fragment to retrieve xml formatted contents
from a JSP page, transform it and return it to the client as XML:
<map:match pattern="**.ext">
<map:generate type="jsp" src="{1}.jsp"/>
<map:transform src="stylesheets/page2ext.xslt">
<map:parameter name="contextPath"
value="{request:contextPath}"/>
<map:parameter name="use-request-parameters" value="true"/>
</map:transform>
<map:serialize type="xml"/>
</map:match>
This works fine, except for the returned mime-type. Instead of returning
the 'text/xml' mime-type (as expected by the XML serializer that does
have the 'mime-type="text/xml"' attribute), Cocoon returns a 'text/html'
mime-type.
I think this 'text/html' mime-type comes from the JSP Generator,
although I'm not for sure. Does anybody know how I can overwrite the
returned mime-type within Cocoon?
Thanking you in advance,
Wouter Westendorp
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
RE: XML serializer returns wrong mime-type with JSP Generator
Posted by Wouter Westendorp <w....@vpro.nl>.
Thank you,
I've worked around the problem by dynamically setting the mime-type
within the source JSP's.
Wouter
-----Oorspronkelijk bericht-----
Van: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
Verzonden: woensdag 23 juni 2004 23:31
Aan: users@cocoon.apache.org
Onderwerp: Re: XML serializer returns wrong mime-type with JSP Generator
On 23.06.2004 18:00, Wouter Westendorp wrote:
> This works fine, except for the returned mime-type. Instead of
returning
> the 'text/xml' mime-type (as expected by the XML serializer that does
> have the 'mime-type="text/xml"' attribute), Cocoon returns a
'text/html'
> mime-type.
>
> I think this 'text/html' mime-type comes from the JSP Generator,
> although I'm not for sure. Does anybody know how I can overwrite the
> returned mime-type within Cocoon?
Unfortunately this is a known bug in Cocoon's JSP handling:
http://issues.apache.org/bugzilla/show_bug.cgi?id=27957. But I saw you
already voted for the bug, so I guess you found it yourself :) Just
added the answer for the archive.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: XML serializer returns wrong mime-type with JSP Generator
Posted by Joerg Heinicke <jo...@gmx.de>.
On 23.06.2004 18:00, Wouter Westendorp wrote:
> This works fine, except for the returned mime-type. Instead of returning
> the 'text/xml' mime-type (as expected by the XML serializer that does
> have the 'mime-type="text/xml"' attribute), Cocoon returns a 'text/html'
> mime-type.
>
> I think this 'text/html' mime-type comes from the JSP Generator,
> although I'm not for sure. Does anybody know how I can overwrite the
> returned mime-type within Cocoon?
Unfortunately this is a known bug in Cocoon's JSP handling:
http://issues.apache.org/bugzilla/show_bug.cgi?id=27957. But I saw you
already voted for the bug, so I guess you found it yourself :) Just
added the answer for the archive.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org