cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vadim Gritsenko" <vadim.gritse...@verizon.net>
Subject RE: Is it possible to fire an error from a XSL file ?
Date Wed, 10 Apr 2002 15:12:29 GMT
> From: sylvain.fetiveau@webmotion.com
[mailto:sylvain.fetiveau@webmotion.com]
> 
> Vadim Gritsenko wrote:
> >
> > You could write an extension function to the Xalan to throw
> > ResourceNotFoundException.
> 
> I just tried that, but in this case, it's not considered by the error
> handler as an error 404, but a simple error 500.
> 
> Any new idea ?

Two ideas:
1. Debug and find out why it is not 404.
Make as simple test: have a pipeline with XSP page and XML serializer,
and throw ResourceNotFoundException from the XSP page. I would expect
that <handle-errors type="404"/> would be called in this situation (I
might be mistaken - Nikola? Ken? ;)
2. Refactor to avoid this issue completely.

Vadim

> 
> > > -----Original Message-----
> > > From: sylvain.fetiveau@webmotion.com
> > [mailto:sylvain.fetiveau@webmotion.com]
> > > Sent: Monday, April 08, 2002 11:15 AM
> > > To: cocoon-users@xml.apache.org
> > > Subject: Is it possible to fire an error from a XSL file ?
> > >
> > > Hi,
> > >
> > > When someone requests an URL like /glossary/*.html, I use a single
XML
> > > file for all the glossaries + an XSL file to transform it (I pass
the
> > > filename of the glossary page to the XSL transformer). Sometimes,
an
> > > unexisting page is requested (i.e. a page which is not listed in
my
> > > large XML file). Is there a way to "fire" something to make cocoon
> > > consider this request as an error 404, which will be then handled
? As
> > > long as I handle the 404 errors, I guess that it's not a real
problem
> > if
> > > I already outputed some content when I "fire" my error... Or maybe
I
> > > should write a Xalan extension to redirect the user to my error
404
> > > page...
> > >
> > > Thank you in advance.
> 
> --
> °v° Sylvain Fétiveau   Tel. (613) 731-4046
> / \ Webmotion Inc.     http://www.webmotion.com
> " " mailto:sylvain.fetiveau@webmotion.com


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

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message