How to close OutputStream [message #368674] |
Thu, 18 June 2009 15:01 |
Alex Messages: 22 Registered: July 2009 |
Junior Member |
|
|
Hello,
I am generating a report in a servlet (doGet method).
The code below shows that BIRT grants response OutputStream.
Because of this, I am not able to redirect it to a jsp when there is an
exception happens.
Throwing ServletException is not very user friendly.
Is there a way to close the OuputStream so that I can forward/redirect it
to jsp error page? Thanks in advance for any comments/inputs.
try {
...
HTMLRenderOption options = new HTMLRenderOption();
options.setOutputStream(response.getOutputStream());
...
} catch (Exception e) {
e.printStackTrace();
throw new ServletException(e);
}
Regards,
Alex
|
|
|
Powered by
FUDForum. Page generated in 0.02830 seconds