I've got a JSP which only contains XML (XUL from Mozilla actually) apart from the directive <%@jsp page contentType="text/xml"%>. When I invoke this JSP directly from the url bar of my browser (not IE, which is not XUL compliant), everything is OK. My XML is recognized and the contentType of my page (right click on the page and PageInfo) is well "text/xml".
But what I do is constructing from a Javascript an XMLHttpRequest, posting it to the server and waiting for its response. When the Javascript gets the response, it opens a new window (win=document.window.open(...)) and writes the received stream in it (win.writeln(responseText)). It works fine with a HTML JSP but not with a XML JSP. Actually, the new window doesn't interpret the incoming stream like an XML (even though my JSP says "<%@jsp page contentType="text/xml"%>" !!! ). A right click on the opened window says, via Page Info, that the contentType is "text/html" !!!
What do I wrong?
But what I do is constructing from a Javascript an XMLHttpRequest, posting it to the server and waiting for its response. When the Javascript gets the response, it opens a new window (win=document.window.open(...)) and writes the received stream in it (win.writeln(responseText)). It works fine with a HTML JSP but not with a XML JSP. Actually, the new window doesn't interpret the incoming stream like an XML (even though my JSP says "<%@jsp page contentType="text/xml"%>" !!! ). A right click on the opened window says, via Page Info, that the contentType is "text/html" !!!
What do I wrong?