Bobby Quninne wrote:
I have been struggling with this issue for a while. I have consulted the docs
on the cocoon site and looked at the forums but cannot find a resolution.
There seems to be no failure loading the sitemap.xamp on startup.
Basically the pages I want displayed when an exception is thrown from a
ServiceableAction never happens. The default cocoon exception page is
displayed.
I have the following in my sitemap :
<map:selector name="exception"
src="org.apache.cocoon.selection.ExceptionSelector">
<exception name="expection.cc.format"
There's a typo there ----^ which doesn't match the map:when below.
class="java.lang.NumberFormatException" />
<exception name="exception.processing"
class="org.apache.cocoon.ProcessingException" />
You might try putting an item here to tell the selector to unroll as
many exceptions as possible. So if your original exception is getting
wrapped in another exception it will still get unrolled and matched:
<exception class="java.lang.Throwable" unroll="true"/>
</map:selector>
<map:pipeline>
<map:match pattern="">
<map:act type="x">
</map:act>
</map:match>
<map:handle-errors>
<map:select type="exception">
<map:when test="exception.cc.format">
<map:generate src="site/html/gen.xml" type="file" />
<map:transform src="site/html/ccFormatFailure.xsl"
/>
<map:serialize type="html"/>
<!--
<map:read src="site/html/ccFormatFailure.xsl" />
-->
</map:when>
<map:when test="exception.processing">
<map:generate src="site/html/gen.xml" type="file" />
<map:transform src="site/html/ccFormatFailure.xsl"
/>
<map:serialize type="html"/>
</map:when>
<map:when test="exception.http">
<map:generate src="site/html/gen.xml" type="file" />
<map:transform src="site/html/ccFormatFailure.xsl"
/>
<map:serialize type="html"/>
</map:when>
<map:otherwise>
<map:generate src="site/html/gen.xml" type="file" />
<map:transform src="site/html/ccFormatFailure.xsl"
/>
<map:serialize type="html"/>
</map:otherwise>
</map:select>
</map:handle-errors>
</map:pipeline>
If the items above don't help, try removing the <map:select> from your
<map:handle-errors> block altogether temporarily and see if your custom
error page is generated then. If it does then that points to a problem
with the exception matching; if not then it could be a problem with your
gen.xml or ccFormatFailure.xsl. Check the output logs too for any errors.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]