You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joose Vettenranta <jo...@iki.fi> on 2004/06/18 09:35:53 UTC
xsp and producing File Not Found
Hi,
with <map:handle-errors ...> you can catch error, if it happens.. say
map:read won't find a file and 404 is returned.. But I don't seem to
find, how to throw 404 error from XSP?
Why I want to do that?
When I use xsp and esql to find file from database, putting error
throwing to <esql:no-results /> would make it easy and centralized way
to handler errors.. (every error catched in <map:handle-errors />).
Thanks,
Joose
--
"Always remember that you are unique, just like everyone else!"
* http://iki.fi/joose/ * joose@iki.fi * +358 44 561 0270 *
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: xsp and producing File Not Found
Posted by Yury Mikhienko <Yu...@megafonkavkaz.ru>.
On Sun, 20 Jun 2004 19:48:54 +0200
Joerg Heinicke <jo...@gmx.de> wrote:
> On 18.06.2004 09:53, John L. Webber wrote:
>
> > Have you tried "response.setStatus(404);"?
>
> Don't do it that way, do it the Cocoon way.
>
> >> with <map:handle-errors ...> you can catch error, if it happens.. say
> >> map:read won't find a file and 404 is returned.. But I don't seem to
> >> find, how to throw 404 error from XSP?
>
> Throw your specific MyException, catch them in map:handle-errors and set
> the status to 404 there. There is no need to throw 404 in XSP itself.
>
> Joerg
>
Also you can throw ResourceNotFoundException("my message") in xsp
--
Best regards,
Yury Mikhienko.
IT ERP group head, ZAO "Mobikom-Kavkaz"
tel: (8632) 704188
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: xsp and producing File Not Found
Posted by Joerg Heinicke <jo...@gmx.de>.
On 18.06.2004 09:53, John L. Webber wrote:
> Have you tried "response.setStatus(404);"?
Don't do it that way, do it the Cocoon way.
>> with <map:handle-errors ...> you can catch error, if it happens.. say
>> map:read won't find a file and 404 is returned.. But I don't seem to
>> find, how to throw 404 error from XSP?
Throw your specific MyException, catch them in map:handle-errors and set
the status to 404 there. There is no need to throw 404 in XSP itself.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: xsp and producing File Not Found
Posted by "John L. Webber" <Jo...@jentro.com>.
Hi Joose,
Have you tried "response.setStatus(404);"?
John
Joose Vettenranta wrote:
> Hi,
>
> with <map:handle-errors ...> you can catch error, if it happens.. say
> map:read won't find a file and 404 is returned.. But I don't seem to
> find, how to throw 404 error from XSP?
>
--
---------------------------------------------------------
Jentro Technologies GmbH
John L. Webber, Software Development
---------------------------------------------------------
Rosenheimer Str. 145e 81671 München
Tel. +49 89 189 169 80 mailto:John.Webber@jentro.com
Fax +49 89 189 169 99 http://www.jentro.com
---------------------------------------------------------
NOTICE: The information contained in this e-mail is confidential or may
otherwise be legally privileged. It is intended for the named recipient
only. If you have received it in error, please notify us immediately by
reply or by calling the telephone number above and delete this message
and all its attachments without any use or further distribution of its
contents. Please note that any unauthorised review, copying, disclosing
or otherwise making use of the information is strictly prohibited. Thank
you.
---------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org