Ralph Goers wrote:

I'm using 2.1.3.

My authentication pipeline calls a generator which in turn calls JAAS.  When
login fails I'd like to catch the LoginException using handle-errors in the
sitemap.  Although I don't get any errors I never see the error handling
happen.  Is handle-errors supported in that context?

If you're not seeing a stacktrace on the LoginException (i.e. it is not being propagated all the way to the top), you might have to catch it in your generator and then re-throw it from generate(), which should allow the ExceptionSelector to see it:


  <map:selector
     logger="sitemap.selector.exception"
     name="exception"
     src="org.apache.cocoon.selection.ExceptionSelector">

     <exception
       class="org.whatever.LoginException"
       name="invalid-login"/>
  </map:selector>


If you wanted to get fancy, you could catch the LoginException and throw your own custom Exception from your generator, and tell the ExceptionSelector about the new one.



Ralph Goers


Regards,

Tony


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



Reply via email to