You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ian Atkin <Ia...@Widelearning.com> on 2000/11/07 13:45:45 UTC

the output stream

people,

i've got a nasty problem with the design of cocoon that i need help with, it
goes something like this:-

i am doing two independent transforms simultaneously on the same XML input
- they create different kinds of output

one output references the other, using named achors

i'm using the generate-id() function to give me the id's necessary to name
the anchors on one output and call the anchors on the other output

i implemented this using servlets and xt and am converting to cocoon.

initially I tried to use the xerces/xalan combo in cocoon, but because of
the use of PIs I had to modify the XML input to insert them - which threw
out the generate-id() function so my linking between outputs didn't work
anymore

as a result I have simply converted my servlet to an XSP page

the problem now is that my XSP page indirectly writes to the output stream
(i pass the response object to XT, which does the writing)

naturally I'm now getting the following exception from tomcat:-

IllegalStateException: Output stream is already being used for this request

the application still works fine, presumably because the XSP page is doing
no writing of it's own

while I quite except that not being able to write to the output stream is an
XSP feature, I *really* need to find a solution to this. All I can come up
with is:-
1. wait until cocoon v2 so I don't have to use PIs and hence don't have to
modify the XML
2. hack cocoon v1.8 so that I can get proper access to the output stream
3. ditch the entire idea of converting my application to cocoon

if anyone has any ideas they would be sorely appreciated.

PS I hope my explanation makes sense!

Ian Atkin
Code Monkey & Text File Editor
Wide Learning
ian.atkin@widelearning.com
020-7253-1211