You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2002/10/02 00:01:40 UTC
DO NOT REPLY [Bug 13186] New: -
after java exception in XSP, Cocoon continues with pipeline
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13186>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13186
after java exception in XSP, Cocoon continues with pipeline
Summary: after java exception in XSP, Cocoon continues with
pipeline
Product: Cocoon 2
Version: 2.0.3
Platform: PC
OS/Version: Windows NT/2K
Status: NEW
Severity: Major
Priority: Other
Component: sitemap components
AssignedTo: cocoon-dev@xml.apache.org
ReportedBy: paint007@mc.duke.edu
When I have a java exception in XSP code, in a pipeline with transform stages,
everything should get short circuited as soon as the exception occurs, that is,
no output from the pipeline should occur. Instead, Cocoon should switch to an
error handler pipeline (if there is one) or to some default error message.
This was the behavior in C2.0.2. In C2.0.3, what happens is that the pipeline
continues through the stages and produces output. If an error handler is set
up, that *also* gets run and produces output. The result is output something
like <html> ... error handler output here ... </html><html> ... original page
stuff here ...</html>.
I've checked this both in our web app and in the (otherwise unmodified)
distribution web app (cocoon.war).
This is easily reproduced. Here's a sitemap entry:
<map:match pattern="bleah">
<map:generate src="bleah.xml" type="serverpages"/>
<map:transform src="bleah.xsl"/>
<map:serialize/>
</map:match>
Here's bleah.xml:
<?xml version="1.0"?>
<xsp:page xmlns:xsp="http://apache.org/xsp">
<page>
<xsp:logic>
int fudge = Integer.parseInt("Hello");
</xsp:logic>
</page>
</xsp:page>
and here's bleah.xsl:
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:template match="page">
<html>
<body>
<h1>Hello!</h1>
<h2>Hey!</h2>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
If done in cocoon.war, you should see both the system error handler, then the
headers "Hello" and "Hey" at the bottom.
-Christopher
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org