We've had some similar strange behaviour with servlet generated formats. Specifically 
with "PDFS" but the solution for encouraging IE to treat the incoming data was to 
append the "file extension" to
the URL, like

        http://myurl/mypath/myXMLservlet?dummyarg=mydummyfile.xml

We had to append a mydummyfile.pdf to end to get the adobe plugin to consistently 
launch, maybe this will get IE to treat the data as XML in addition to setting the 
content-type

Bill

-----Original Message-----
From: Nic Ferrier [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:00 PM
To: [EMAIL PROTECTED]
Subject: Re: Output xml string from a servlet directly to browser and
preserve the xml structure


"Ouyang, Jian" <[EMAIL PROTECTED]> writes:

> I want to be able to use an output method to directly output from
> servlet to browser an xml string with the xml tags preserved and the
> xml structure clearly presented. (The result should be the same as
> if one clicks on an .xml file).

I'm not sure what you mean by xml tags preserved. IE does some
strange things with XML, it tries to display the document as a DOM.

But I'm not sure if that's the behaviour you're after...

> I tried to do response.setContentType("text/xml") before print out
> and didn't get what I want. (The result is the same as if I use
> ("text/html"), ("text/plain"));

If you specified the content type as text/plain you'd get just the
plain text of the XML but I presume that's not what you want.


Nic Ferrier

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to