You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Marcus Crafter <cr...@dresdnerbank.de> on 2000/10/17 21:11:36 UTC
[C2] RequestDispatchers/Serializers ?
Hi All,
Hope everything is going well for all.
Just recently I've been looking at our use of RequestDispatchers
objects in our XSP code, and I've come across some more interesting
behaviour.
Consider the following sitemap pipelines:
<map:match pattern="page1.xml">
<map:generate type="serverpages" src="page1.xml"/>
<map:serialize/>
</map:match>
<map:match pattern="page2.xml">
<map:generate type="serverpages" src="page2.xml"/>
<map:transform src="stylesheet.xsl"/>
<map:serialize type="html"/>
</map:match>
Assume that page1.xml contains some XSP which uses a request
dispatcher to forward the request page2.xml.
What happens when the RequestDispatcher.forward(...) method returns
and Cocoon goes into the page1 serializer ? (It's already been through
the page2 serializer).
I'm finding that I'm receiving an IOException in my T4 logs
(java.io.IOException: Cannot write to a closed output stream), and a
trailing 'tomcat error report' page at the end of the dispatched xsp
page output (!)
From what I can see, ResourcePipeline.java enforces the use of a
serializer (line 157) unless there is a reader defined (line 129), so
I can't see a way to get around this.
Has anyone else experienced/heard of this behaviour before ?
Cheers,
Marcus
--
.....
,,$$$$$$$$$, Marcus Crafter
;$' '$$$$: Computer Systems Engineer
$: $$$$: Open Software Associates GmbH
$ o_)$$$: 82-84 Mainzer Landstrasse
;$, _/\ &&:' 60327 Frankfurt Germany
' /( &&&
\_&&&&' Email : Marcus.Crafter@osa.de
&&&&. Business Hours : +49 69 9757 200
&&&&&&&: After Hours : +49 69 49086750