tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Eustace <>
Subject workaround for jsp:include to output BLOB from servlet?
Date Thu, 16 May 2002 14:39:45 GMT

Hello all.

I've searched the archives on this one, and found some answers, but am 
looking for hints on clever ways to include binary output in a jsp page.

I've already tried using a jsp:include tag thus <jsp:include 
page="/servlet/CultureBlobServlet">, which calls a servlet that outputs the 
binary data from the DB.
I'm getting the following exception:
java.lang.IllegalStateException at 


which I now realise is because Tomcat doesn't allow you to include a 
servlet that calls response.getOutputStream().

Has anyone come up with any workarounds for this? I want to have a jsp page 
with different includes for text and binary output. I could of course store 
the image name in the DB and just reference that, but if possible I'd like 
to be able to output the BLOB directly in the JSP.
I thought I'd try to get the servlet to pass a byte array to the JSP but 
have seen in the archives that this doesn't work.

Any insights or help much appreciated,

Many thanks,


This message has been scanned for viruses by the
DIT Computer Centre Mail Scanner service, and is
believed to be clean.

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message