Nabble didn't send my attachment, so here it is.

With regards,

Nick S.

-----Original Message-----
From: Nick Stolwijk [mailto:[EMAIL PROTECTED]
Sent: Mon 4/14/2008 12:55
To: [email protected]
Subject: Re: [2.1] Handling errors in sub sitemap
 

Ok, I've taken the samples, but I still can't find out what I'm doing wrong.

What I did:

Checkout samples and got it running.
I made a few changes (see attachment) and opened
http://localhost/samples/errorhandling/sax

Expected:

A cought sax exception by this errorhandler:
      <map:handle-errors>
        <map:select type="exception">
          <map:when test="sax">
            <map:generate src="notFound.html"/>
            <map:serialize/>
          </map:when>
        </map:select>
      </map:handle-errors>  

What I got: the default error page.

What am I doing wrong?

With regards,

Nick S.

I have adjusted the 

Vadim Gritsenko wrote:
> 
> On Apr 9, 2008, at 4:55 PM, Grzegorz Kossakowski wrote:
>> Nick Stolwijk pisze:
>>> Can someone help me with this? The documentation doesn't seem to  
>>> reflect the
>>> current behaviour and I can't find any other postings about this.
>>
>> Hi Nick,
>>
>> I'm not the expert on handling errors in sitemaps so can't give you  
>> any quick advice. However, if you could prepare some minimal sample  
>> that I could quickly run in C2.1 then I could have a debugging  
>> session over the weekend and most probably come with some conclusion.
>>
>> BTW. I believe that error handling in mounted sitemaps should work  
>> just fine.
> 
> There is also a fairly comprehensive set of sitemap error handling  
> samples (2.1 and 2.2 links):
> http://svn.apache.org/repos/asf/cocoon/branches/BRANCH_2_1_X/src/webapp/samples/errorhandling/
> http://svn.apache.org/repos/asf/cocoon/trunk/blocks/cocoon-core-sample/cocoon-core-main-sample/src/main/resources/COB-INF/errorhandling/
> 
> Nick, please take a look if you have not see them yet.
> 
> Vadim
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-2.1--Handling-errors-in-sub-sitemap-tp16475316p16676070.html
Sent from the Cocoon - Users mailing list archive at Nabble.com.


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




Index: samples/errorhandling/sitemap.xmap
===================================================================
--- samples/errorhandling/sitemap.xmap	(revision 647704)
+++ samples/errorhandling/sitemap.xmap	(working copy)
@@ -32,6 +32,7 @@
           <xpath name="application2" test="errorCode=2"/>
         </exception>
         <exception name="validation" class="org.apache.cocoon.samples.errorhandling.ValidationException"/>
+        <exception name="sax" class="org.xml.sax.SAXException"/>
         <exception name="not-found" class="org.apache.cocoon.ResourceNotFoundException"/>
         <exception class="java.lang.Throwable" unroll="true"/>
       </map:selector>
@@ -68,6 +69,15 @@
       <map:match pattern="internal/**">
         <map:mount uri-prefix="internal" src="internal/"/>
       </map:match>
+
+      <map:handle-errors>
+        <map:select type="exception">
+          <map:when test="sax">
+            <map:generate src="notFound.html"/>
+            <map:serialize/>
+          </map:when>
+        </map:select>
+      </map:handle-errors>      
     </map:pipeline>
 
     <map:pipeline>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to