Hello,
I m not able to get that object in action...can u tell me how will I get
this object in XSP and how will I call get and set method on that.

-----Original Message-----
From: Nicola Ken Barozzi [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, October 16, 2002 6:28 PM
To: [EMAIL PROTECTED]
Subject: [SUMMARY] Exception object in handle-errors? < Re: Coocon Error
Handling >




Murari wrote:
> In cocoon we have this tag to show the error message
> 
>                     <map:handle-errors>
>                               <map:transform
src="../stylesheets/system/error2html.xsl"/>
>                               <map:serialize status-code="500"/>
>                       </map:handle-errors>
> 
> But I want to customize the error messages...and I want to display the

> message according to the the exception catch...in coocn there is only 
> stylesheet ,it displaying exception as it is
> 
> So How to cature the Exception object in stylesheet and show the 
> message???

In <handle-errors/> Cocoon places in the Context the Notifying Object 
that was created from the Exception.
NotifyingGenerator (the default one) does it like this:

  notification  =
(Notifying)objectModel.get(Constants.NOTIFYING_OBJECT);

So you can use this object in an Action for example, or other Cocoon 
components, to make the selection.

Or simply make a stylesheet that uses <xsl:choose> to show the 
appropriate message.

-- 
Nicola Ken Barozzi                   [EMAIL PROTECTED]
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

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

Reply via email to