if it does not work the same logic applies. I think all the problem was Ouyang, Jian was just setting the content type without setting the "charset" as the parameter, Try passing that too in the setContentType like response.setContentType("text/xml; charset=ISO-8859-1" );

I think that should work for you Richard. :)

Vijay Naidu
System Analyst
-----------------------------------------------------------------
Smile Is A Curve That Makes Everything Straight. Keep Smiling
-----------------------------------------------------------------
From: "Chen, Gin" <[EMAIL PROTECTED]>
Reply-To: "A mailing list for discussion about Sun Microsystem's Java Servlet API Technology." <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Subject: Re: Output xml string from a servlet directly to browser and pres erve the xml structure
Date: Wed, 27 Mar 2002 13:45:45 -0500
it will.. use setheader for contenttype.. much like displaying excel
spreadsheets
-tim
-----Original Message-----
From: Richard Yee [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 27, 2002 1:44 PM
To: [EMAIL PROTECTED]
Subject: Re: Output xml string from a servlet directly to browser and pres
erve the xml structure
This isn't going to work in a SERVLET.
-Richard
At 01:31 PM 3/27/2002 -0500, you wrote:
Dont use a response.setContentType
do this instead:
<%@ page contentType="text/xml;charset=ISO-8859-1" %>
then just write out the xml
example:
<%@ page contentType="text/xml;charset=ISO-8859-1" %>
text1
text2
text3
-----Original Message-----
From: Ouyang, Jian [ mailto:[EMAIL PROTECTED]
]
Sent: Wednesday, March 27, 2002 12:49 PM
To: [EMAIL PROTECTED]
Subject: Output xml string from a servlet directly to browser and preserve
the xml structure
Hi,
I asked for help in displaying xml in IE as it is and get little hint. Let
me restate the problem.
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 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"));
Some Servlet/XML Guru out there please help.
Thanks.
Jian


Send and receive Hotmail on your mobile device: Click Here
___________________________________________________________________________ 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