P
Paul Vincent Craven
I'm trying to do something portal-like with a servlet. I want to
output html from the servlet, and put the content of multiple JSP's as
well.
My problem is that only one call to request.getOutputStream() is
allowed. This is per the spec, and both Tomcat and Websphere will
throw an exception:
java.lang.IllegalStateException: getOutputStream() has already been
called for this response
Because RequestDispatcher.include calls getOutputStream, I can only do
one include. I also can't combine it with any other input. Is there
another way?
If I could capture RequestDispatcher output into a buffer I could dump
that out easily. But the only way I know to do that is to make another
call to the webserver, and I don't want to do that!
Any suggestions would be appreciated. Thanks!
Paul Vincent Craven
(e-mail address removed)
http://www.cravenfamily.com
output html from the servlet, and put the content of multiple JSP's as
well.
My problem is that only one call to request.getOutputStream() is
allowed. This is per the spec, and both Tomcat and Websphere will
throw an exception:
java.lang.IllegalStateException: getOutputStream() has already been
called for this response
Because RequestDispatcher.include calls getOutputStream, I can only do
one include. I also can't combine it with any other input. Is there
another way?
If I could capture RequestDispatcher output into a buffer I could dump
that out easily. But the only way I know to do that is to make another
call to the webserver, and I don't want to do that!
Any suggestions would be appreciated. Thanks!
Paul Vincent Craven
(e-mail address removed)
http://www.cravenfamily.com