<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you, Michael!<br>
<br>
This works perfect:<br>
<br>
CmsFlexController controller = CmsFlexController.getController(request);<br>
controller.getTopResponse().setContentType("text/xml");<br>
<br>
<br>
much obligated,<br>
Hendrik<br>
<br>
<br>
Michael Moossen schrieb:
<blockquote cite="mid:4A9E3CEF.7010104@alkacon.com" type="cite">
<pre wrap="">Hi Hendrik!
you have to use something like this:
// set the mime type to application/json
CmsFlexController controller =
CmsFlexController.getController(getRequest());
controller.getTopResponse().setContentType("application/json");
HTH
-------------------
Michael Moossen
Alkacon Software GmbH - The OpenCms Experts
<a class="moz-txt-link-freetext" href="http://www.alkacon.com">http://www.alkacon.com</a> - <a class="moz-txt-link-freetext" href="http://www.opencms.org">http://www.opencms.org</a>
Hendrik Konitzer schrieb:
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
were trying to generate a XML-Output via JSP to process es further with
jQuery.
But the problem is, the returned Contenttype for the response is always
text/html and therefore, jQuery refuses the processing.
We set the Content-Type in the JSP with various methods, directly with
<% response.setContentType("text/xml;charset=UTF-8");%> or as page
directive like <%@ page contentType="text/xml; charset=UTF-8"%>.
But the response is always text/html, it seems that OpenCms forced the
ContentType to this.
Therefore, when it comes to (jQuery Javascript):
$.post("joedoe.jsp",{},processXML(data),"xml"); - it fails.
How to set the ContentType of the response of OpenCms-JSPs to other than
"text/html" ?
Thanks for attention,
</pre>
</blockquote>
<pre wrap=""><!---->
_______________________________________________
This mail is sent to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
<a class="moz-txt-link-freetext" href="http://lists.opencms.org/mailman/listinfo/opencms-dev">http://lists.opencms.org/mailman/listinfo/opencms-dev</a>
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
Hendrik Konitzer<br>
<br>
:: Kontaktdaten ::<br>
Durchwahl: + 49 261 296 3439 - 133<br>
E-mail: <a href="mailto:h.konitzer@durato.de">h.konitzer@durato.de</a>
| Skype: <a href="skype:hendrikkonitzer?chat">hendrikkonitzer</a><br>
V-Card: <a href="http://vcards.durato.de">vcards.durato.de</a><br>
::<br>
durato Ltd.<br>
Pastor-Klein-Str. 17E<br>
56073 Koblenz<br>
Tel.: + 49 261 296 3439 - 0 | Fax: + 49 261 296 3439 - 199<br>
Email: <a href="mailto:info@durato.de">info@durato.de</a> | URL: <a
href="http://www.durato.de">www.durato.de</a><br>
::</div>
</body>
</html>