File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Java SE 8 for the Really Impatient
this week in the
IllegalStateException when piping XSLT result into getOutputStream()
Joined: Apr 19, 2002
Dec 10, 2002 17:56:00
DOMSource domSrc = new DOMSource(xmlDom); StreamResult result = new StreamResult([B]res.getOutputStream()[/B]); Transformer transformer = templatesStore.getTransformer(stylePath); transformer.transform(domSrc, result);
Is it because UTF-8 format cannot be printed into a
response's output stream?
I used getWriter() instead of getOutputStream(), and it works.
[ December 10, 2002: Message edited by: Chu Tan ]
I agree. Here's the link:
subject: IllegalStateException when piping XSLT result into getOutputStream()
XSLT transformer formatting
xml output formatting
Special Characters in XML
redirect XML/DOM output to file??
build DOM Object of a file whose path is given
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014