tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "DARIOL Rodolphe DvSI/SIFAC" <>
Subject Impossible to write the response after processing a JSP with Tomcat 3.2.3
Date Fri, 16 Nov 2001 08:12:35 GMT

I want to generate a PDF file from a JSP with a servlet doing this :

    - call a JSP and redirect the ouput to a HTML file,
    - then, transform the HTML to a PDF file via HtmlDoc,
    - finally, open then PDF and send it to the client.

The output is redirected to a HTML file whith a tag in the JSP
like this :
JSP : <% out = .... >

The HtmlDoc programm is call as an external process.

I'm getting the ServletOutputStream from the response and write the
PDF stream into it.

This treatment works fine with Tomcat 3.1, BEA WebLogic 5.1 and 4.5,
IBM WebSphere 2.03 and 3.02 (there's another problem whith WebSphere

When I try it with Tomcat 3.2.3, the browser complains that the
document contains no data.

After debugging and reading the code, I see that the problem is
comming from the forward method (doForward in reality) of the
RequestDispatcherImpl whitch close the ServletOutputStream and, then,
the servletoutputstream writing has no effect.

As I didn't see in the specs that it's impossible to write on the
ServletOuputStream after calling a JSP, I don't know if it's a bug.

But, anyway, if it's possible, I would like any comments or suggestions
about doing this treatment in a better way.

Thanks in advance.

Rodolphe Dariol
Quelque temps qu'il fasse en novembre,
commence le feu dans ta chambre.

To unsubscribe:   <>
For additional commands: <>
Troubles with the list: <>

View raw message