You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by giacomo <gi...@apache.org> on 2001/07/02 21:43:41 UTC

Re: Beautify 404, Was: [C2][Patch] /map:pipelines/map:handle-errors

On Sat, 30 Jun 2001, Vadim Gritsenko wrote:

> Giacomo,
>
> "Catch all" would not be enough; if you have something like <map:match="*.xml">,
> you still can get ResourceNotFoundException which would be processed by
> CocoonServlet, returning hard-coded HTML....
>
> Do you see any elegant solution to this poroblem?
> I suggested to introduce types for <map:handle-errors> element:
>   <map:handle-errors type="404"> <!-- 404 or something else... like exception class name -->
>   </...>
> What is your opinion?

I don't get what your type attribute is all about. If you'd like to send
a status code use the serializers mime-type and status-code attribute to
achieve that. Hope this helps.

Giacomo

>
> Vadim
>
> > -----Original Message-----
> > From: giacomo [mailto:giacomo@apache.org]
> > Sent: Friday, June 29, 2001 18:21
> > To: cod
> > Subject: Re: [C2][Patch] /map:pipelines/map:handle-errors
> >
> >
> > On Fri, 29 Jun 2001, Steffen Stundzig wrote:
> >
> > > Hi all,
> > >
> > > I've the problem, that I must beautify the page that raises on an
> > > ResourceNotFoundException if no matching pipeline could be found.
> > >
> > > Unfortunately this page is directly written as HTML
> > > into the ServletOutputStream from inside the Cocoon Servlet. Or I've
> > > overlooked something?
> > >
> > > My idea was to use the map:handle-errors element for this purpose. So I've
> > > changed the sitemap.xsl to support also such an element as child of
> > > map:pipelines and not only as child of map:pipelines/map:pipeline.
> >
> > You can use a "catch all" matcher as the very last one in your sitemap.
> >
> >   <map:match pattern="**">
> >     ...
> >   </map:match>
> >
> > Giacomo
> >
> > >
> > > If this element doesn't exist, the mechanism is as for now but if it exist,
> > > the error-page is 'pipelined' in the standard map:handle-error manner.
> > >
> > > Attached is my patch for this stuff.
> > >
> > > Possibly is anybody interested in it.
> > >
> > > Regards
> > > 	Steffen...
> > >
> > >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> > For additional commands, email: cocoon-dev-help@xml.apache.org
> >
>
> _________________________________________________________
> Do You Yahoo!?
> Get your free @yahoo.com address at http://mail.yahoo.com
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org