Embedding rtf output in servlet response
"Theo Theodoric" <[email protected]> Wed, 20 Nov 2002 12:13:48 +0100
| Newsgroups | gmane.text.xml.jfor.general |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I' m using servlet to generate RTF. So I tried to get the RTF output into a
stream and print it on screen via a browser, without create physical file.
But I don't obtain anything.
Here is my code:
public void ConvertRTF (String xmlString,
HttpServletResponse response)
throws ServletException {
try {
StringReader stringReader = new StringReader(xmlString);
final InputSource input = new InputSource(stringReader);
ByteArrayOutputStream out = new ByteArrayOutputStream();
Writer output = new OutputStreamWriter(out);
new Converter(input,output,Converter.createConverterOption ());
System.out.println("*** "+out.toString()); //nothing returned
out.writeTo(response.getOutputStream());
}
catch (Exception e) {
System.out.println("Message : "+e.toString());
}
Could anybody helps me, please?
Excuses my bad english. If you want, you can answer in french.
Bests regards
Theo
_________________________________________________________________
MSN Messenger : discutez en direct avec vos amis !
http://www.msn.fr/msger/default.asp
-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing
your web site with SSL, click here to get a FREE TRIAL of a Thawte
Server Certificate: http://www.gothawte.com/rd524.html