This is my pipeline:

<map:match pattern="mysite/**">
  <map:mount check-reload="yes" reload-method="synchron" src="mysite/sitemap.xmap" 
uri-prefix="mysite"/>
</map:match>

and the mounted pipeline is something like:
<map:match pattern="index.html">
  <map:read src="index.html"/>
</map:match>
<map:handle-errors>
  <map:transform src="error.xsl"/>
  <map:serialize type="html"/>
</map:handle-errors>

if I try
http://localhost;8080/cocoon/mysite/anything.html
I expect to find my custom error page, instead I get "Cocoon 2 - Resource not found"

but if I change my mounted pipeline:
<map:pipeline>
   <map:match pattern="index.html">
      <map:read src="index.html"/>
   </map:match>
   <!-- force an error -->
   <map:match pattern="*.html">
      <map:read src="dontexists.html"/>
   </map:match>
   <map:handle-errors>
      <map:transform src="error.xsl"/>
      <map:serialize type="html"/>
   </map:handle-errors>
</map:pipeline>

and I try
http://localhost;8080/cocoon/mysite/anything.html
I get my custom error page.

It seems that Cocoon performs my handle-errors only if it finds an error WHILE 
processing a match pattern.
Whithout the <map:match pattern="*.html">, my error.xsl isn't executed.

I think it's a bug ... correct me if I'm wrong.

Cocoon 2.0.3 - Tomcat 4.1.12 - j2sdk1.4.0 - Win2k server



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to