[jdom-interest] JDOM, Xalan and Servlets

James Strachan james at metastuff.com
Tue Oct 17 09:27:13 PDT 2000

I don't really think this has much to do with JDOM - its an XSLT issue.

Basically you want the XSLT processor to output the HTML in the response to
the browser, so the XSLT processor should be using the Writer returned from
HttpServletResponse.getWriter() to output its results.

This is fairly basic Servlet / XSLT stuff - I'd look at (say) Xalan's site,
examples, mail list, etc for more help. (http://xml.apache.org)


James Strachan
email: james at metastuff.com
web: http://www.metastuff.com
----- Original Message -----
From: "Ana Paula Fernandes" <afernandes at ws.uabmc.edu>
To: <jdom-interest at jdom.org>
Sent: Tuesday, October 17, 2000 4:25 PM
Subject: [jdom-interest] JDOM, Xalan and Servlets

> Hello,
> I am looking for some help to output a servlet response to the browser
> that contains HTML generated through an XML transformation. I have a
> class called XML_Formatter that is supposed to read XML strings,  build
> a JDOM document, use Xalan XSLT processor (process the document applying
> a stylesheet to it) and give this result back to the servlet response to
> output it to the browser. It seems quite simple as the source code
> actually is, but I just dont seem to be able to get anything in the
> browser at all. I'm using threads and PipedInput/Output Streams to pass
> the JDOM document back and forth through the XSL processor. So how can I
> send my outputstream to the servlet response ? How do I print an
> outputstream (PipedOutputStream in this case) ? Do I need to rebuild a
> JDOM document after I have my xml doc. transformed ? Is there another
> solution to combine JDOM with Xalan and Servlets without
> PipedInput/OutputStreams and threads ? I am willing to send the source
> code to anyone who can help me to figure this out.
> Thank you,
> Ana Paula Fernandes
> Health Systems Information Services
> University of Alabama in Birmingham
> email: afernandes at ws.uabmc.edu
> phone: (205) 975-5447
> _______________________________________________
> To control your jdom-interest membership:

If you are not the addressee of this confidential e-mail and any
attachments, please delete it and inform the sender; unauthorised
redistribution or publication is prohibited. Views expressed are those of
the author and do not necessarily represent those of Citria Limited.

More information about the jdom-interest mailing list