[opencms-dev] error page for subfolder

Patric Dosch patric.dosch at virtual-identity.com
Wed Mar 8 14:55:31 CET 2017


Fine ;)


Von: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von lruggeri at maticad.it
Gesendet: Mittwoch, 8. März 2017 09:26
An: 'The OpenCms mailing list' <opencms-dev at opencms.org>
Betreff: [opencms-dev] error page for subfolder

Not yet :). Thank you.

PS: yes cms is an instance of CmsJspStatusBean

Bye, L.

Da: opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org> [mailto:opencms-dev-bounces at opencms.org] Per conto di Patric Dosch
Inviato: Tuesday, March 7, 2017 4:16 PM
A: The OpenCms mailing list <opencms-dev at opencms.org<mailto:opencms-dev at opencms.org>>
Oggetto: Re: [opencms-dev] error page for subfolder


... have you tried cms.getRequestUri()?





I guess your "cms" is one of CmsJspStatusBean(pageContext, request, response, exception);





Regards, Patric




Von: opencms-dev-bounces at opencms.org<mailto:opencms-dev-bounces at opencms.org> [mailto:opencms-dev-bounces at opencms.org] Im Auftrag von lruggeri at maticad.it<mailto:lruggeri at maticad.it>
Gesendet: Dienstag, 7. März 2017 15:30
An: 'The OpenCms mailing list' <opencms-dev at opencms.org<mailto:opencms-dev at opencms.org>>
Betreff: [opencms-dev] error page for subfolder

Hello,
is it possible in OpenCms 9.5 to provide a custom error page for an entire subfolder?
I know I can set an error page jsp for an entire site. This is the actual logic:

if (cms.getStatusCode().intValue() == 500) {
    cms.forwardToErrorPage("/sites/default/500/");
} else {
   cms.forwardToErrorPage("/sites/default/404/");
}

How can I check where the error originated?
Thanks

Bye, L.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://webmail.opencms.org/pipermail/opencms-dev/attachments/20170308/7707f08e/attachment.htm>


More information about the opencms-dev mailing list