tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From JV <>
Subject Re: Change the encoding format of xml outpu
Date Sat, 20 Jan 2007 19:39:03 GMT
Hi Sarah,

Have you included this in the page-code?

<%@ page contentType="application/xml" %>


Op 20 jan 2007, om 20:19 heeft Sarah Parrott het volgende geschreven:

> Hi,
> I'm using Tomcat 5.5 from within eclipse, and using java code to  
> create and
> save a new xml document on the server. The first line in the xml  
> doc is
> <?xml version="1.0" encoding="UTF-16"?>
> If I try and view this in eclipse, or parse it using a sax parser,  
> I get the
> error 'content not allowed in prolog'. However, I can open it fine in
> something like notepad, and if I change the encoding in the file to  
> UTF-8,
> it opens fine in eclipse/SAX with no other modifications to the  
> file. How
> can I change it so it is written with UTF-8 in the first place?  
> I've tried
> looking in the server properties but every reference to encoding I  
> can find
> is already set to UTF-8. Is there something I'm missing? Or am I  
> going to
> have to do an xslt transformation each time read the xml?
> Thanks in advance,
> Sarah

To start a new topic, e-mail:
To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message