cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nicola Ken Barozzi <>
Subject Re: New CocoonServlet throws NullPointerException...
Date Thu, 06 Feb 2003 21:16:18 GMT

Pier Fumagalli wrote, On 06/02/2003 22.01:
> "Vadim Gritsenko" <> wrote:
>>Pier Fumagalli wrote:
>>>Well, anyhow, this fixes it...
>>It does not fix the reason of NPE though, this is just a workaround.
>>Intention was not to log stacktrace in under certain conditions.
> Yes... That's why I didn't commit it straight away.... I didn't quite figure
> out yet exactly what the NotificationManager does... :-)
>>I committed the fix, could you please try it out?
> It does work, but I still don't get how can I generate something like the
> default error page, when I start using the map:handle-error I have a
> completely different set of stuff coming out (like, still, the
> stacktrace)...

Who is the stupid guy that made that crap?!? <whistle> ;-P

> Is there any sort of documentation on <map:handle-error/> somewhere?


> I'm going to get a headache soon :-( :-(

Oh ooo...

Well, basically the stuff that does the notifying is in 

Basically it's about using a Notifying object to create a notification.
A Notifying object must have these infos:

      * Gets the Type of the Notifying object
     String getType();

      * Gets the Title of the Notifying object
     String getTitle();

      * Gets the Source of the Notifying object
     String getSource();

      * Gets the Sender of the Notifying object
     String getSender();

      * Gets the Message of the Notifying object
     String getMessage();

      * Gets the Description of the Notifying object
     String getDescription();

      * Gets the ExtraDescriptions of the Notifying object
     Map getExtraDescriptions();

The DefaultNotifyingBuilder is the default implementation of the 
notifier, that creates the messages in xml and html. The xml dtd is 
fixed, and the html mimics that.

As for handle-errors, it works like this: when an error in caught by the 
sitemap, a Notifying object is created from the error and added to the 
context. Then a new pipeline is setup, that is the handle-errors one, 
and the generator is the implicit NotifyingGenerator, that takes the 
Notifying stuff from the context and generates the sax events in the 
fixed DTD.

This passing stuff per context was done with the help of Peter Royal (hi 
Peter!) to make actions that work on the Notifying usable in handle-errors.

The implicit Generator should not remain implicit anymore. We have voted 
to make it specifiable in handle-errors. Just someone has to do it.

If you have other questions, and you surely will ;-) I'm here.

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

To unsubscribe, e-mail:
For additional commands, email:

View raw message