tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dimitris Dinodimos <dimdi...@yahoo.com>
Subject Re: serializing XML to a ServletOutputStream fails
Date Mon, 05 Feb 2001 14:27:39 GMT
Use the PrintWriter object returned by
response.getWriter().
You will find more info at
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletResponse.html

--- Michael Mealling <michael@bailey.dscga.com> wrote:
> (This might be a bug so I'm cc-ing to tomcat-dev)
> Hi,
>     I'm trying to serialize some XML out to a
> ServletOutputStream but
> the resulting XML on the client side contains
> corrupted Unicode
> characters (the DOM I'm serializing out contains
> Chinese, Korean,
> English, etc). Here's the code in question:
> 
>         response.setContentType("text/xml;
> charset=UTF-8");
>         ServletOutputStream out =
> response.getOutputStream();
> 
 
> This code looks like its the right way to do this
> but either
> I've hit a bug or else I'm missing something (an
> encoding somewhere
> between a Stream and a Writer?)
> 
 


__________________________________________________
Get personalized email addresses from Yahoo! Mail - only $35 
a year!  http://personal.mail.yahoo.com/

Mime
View raw message