tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Eustace <alan.eust...@dit.ie>
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 
org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:109)

...

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,

Alan



--
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:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message