[jdom-interest] XMLOutputter bug?
Bradley S. Huffman
hip at a.cs.okstate.edu
Mon Apr 8 13:06:25 PDT 2002
Look in the FAQs for "socket sometimes hangs", I think it has a solution
to your problem.
Brad
Philipp Sumi writes:
> Hello
>
> I've recently read an article by Brett McLaughlin concerning JDOM & XSLT and
> tried to implement the sample code, which can be found at
> http://www-106.ibm.com/developerworks/java/library/x-tipjdom.html
>
> I don't know why, but when using the pipes as below, Tomcat hangs while
> outputting. If I use the XMLOutputter with something different (e.g. another
> StringWriter) everything works fine. Is this a bug in the API or in my code?
>
> Thanks for your advice
>
> Philipp
>
>
> public void renderDoc (Document document) {
> // I/O streams for Source
> PipedInputStream sourceIn = new PipedInputStream();
> PipedOutputStream sourceOut = new PipedOutputStream(sourceIn);
> StreamSource source = new StreamSource(sourceIn);
>
> //initialisation of Streamresult - shouldn't interfere, I guess
> writer = new StringWriter ();
> StreamResult result = new StreamResult(writer);
>
> System.out.println("this comment is displayed");
>
> // Output to pipe
> xmlOutputter.output (document, sourceOut);
> sourceOut.close();
> System.out.println("this is never displayed");
> //more code...
> }
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost
> .com
More information about the jdom-interest
mailing list