<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Wingdings;
panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Vorformatiert Zchn";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.HTMLVorformatiertZchn
{mso-style-name:"HTML Vorformatiert Zchn";
mso-style-priority:99;
mso-style-link:"HTML Vorformatiert";
font-family:"Courier New";}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0cm;
mso-margin-bottom-alt:auto;
margin-left:0cm;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
p.PreformattatoHTML, li.PreformattatoHTML, div.PreformattatoHTML
{mso-style-name:"Preformattato HTML";
mso-style-link:"Preformattato HTML Carattere";
margin:0cm;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
span.PreformattatoHTMLCarattere
{mso-style-name:"Preformattato HTML Carattere";
mso-style-priority:99;
mso-style-link:"Preformattato HTML";
font-family:Consolas;
mso-fareast-language:EN-US;}
span.E-MailFormatvorlage22
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.E-MailFormatvorlage23
{mso-style-type:personal;
font-family:"Arial",sans-serif;
color:#1F497D;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.E-MailFormatvorlage24
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.E-MailFormatvorlage25
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.E-MailFormatvorlage26
{mso-style-type:personal-reply;
font-family:"Arial",sans-serif;
color:#1F497D;
font-weight:normal;
font-style:normal;
text-decoration:none none;}
span.shorttext
{mso-style-name:short_text;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:70.85pt 2.0cm 2.0cm 2.0cm;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="DE" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span class="shorttext"><span lang="EN">Fine ;)<o:p></o:p></span></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE"> opencms-dev-bounces@opencms.org [mailto:opencms-dev-bounces@opencms.org]
<b>Im Auftrag von </b>lruggeri@maticad.it<br>
<b>Gesendet:</b> Mittwoch, 8. März 2017 09:26<br>
<b>An:</b> 'The OpenCms mailing list' <opencms-dev@opencms.org><br>
<b>Betreff:</b> [opencms-dev] error page for subfolder<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Not yet </span><span lang="EN-US" style="font-family:Wingdings;color:#1F497D">J</span><span lang="EN-US" style="color:#1F497D">. Thank you.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">PS: yes cms is an instance of
</span><span lang="EN-GB" style="color:black">CmsJspStatusBean</span><span lang="EN-US" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D">Bye, L.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:IT">Da:</span></b><span lang="EN-US" style="mso-fareast-language:IT">
</span><span lang="IT"><a href="mailto:opencms-dev-bounces@opencms.org"><span lang="EN-US" style="mso-fareast-language:IT">opencms-dev-bounces@opencms.org</span></a></span><span lang="EN-US" style="mso-fareast-language:IT"> [</span><span lang="IT"><a href="mailto:opencms-dev-bounces@opencms.org"><span lang="EN-US" style="mso-fareast-language:IT">mailto:opencms-dev-bounces@opencms.org</span></a></span><span lang="EN-US" style="mso-fareast-language:IT">]
<b>Per conto di </b>Patric Dosch<br>
<b>Inviato:</b> Tuesday, March 7, 2017 4:16 PM<br>
<b>A:</b> The OpenCms mailing list <</span><span lang="IT"><a href="mailto:opencms-dev@opencms.org"><span lang="EN-US" style="mso-fareast-language:IT">opencms-dev@opencms.org</span></a></span><span lang="EN-US" style="mso-fareast-language:IT">><br>
<b>Oggetto:</b> Re: [opencms-dev] error page for subfolder<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<pre style="background:white"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:DE">… have you tried cms.getRequestUri()?<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:DE"><o:p> </o:p></span></pre>
<pre style="background:white"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:DE"><o:p> </o:p></span></pre>
<pre style="background:white"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:DE">I guess your “cms” is one of </span><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:DE">CmsJspStatusBean(pageContext, request, response, exception);<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:DE"><o:p> </o:p></span></pre>
<pre style="background:white"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:DE"><o:p> </o:p></span></pre>
<pre style="background:white"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D;mso-fareast-language:DE">Regards, Patric<o:p></o:p></span></pre>
<pre style="background:white"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Courier New";color:black;mso-fareast-language:DE"><o:p> </o:p></span></pre>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="font-size:10.0pt;font-family:"Arial",sans-serif;color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span style="mso-fareast-language:DE">Von:</span></b><span style="mso-fareast-language:DE">
</span><span lang="IT"><a href="mailto:opencms-dev-bounces@opencms.org"><span lang="DE" style="mso-fareast-language:DE">opencms-dev-bounces@opencms.org</span></a></span><span style="mso-fareast-language:DE"> [</span><span lang="IT"><a href="mailto:opencms-dev-bounces@opencms.org"><span lang="DE" style="mso-fareast-language:DE">mailto:opencms-dev-bounces@opencms.org</span></a></span><span style="mso-fareast-language:DE">]
<b>Im Auftrag von </b></span><span lang="IT"><a href="mailto:lruggeri@maticad.it"><span lang="DE" style="mso-fareast-language:DE">lruggeri@maticad.it</span></a></span><span style="mso-fareast-language:DE"><br>
<b>Gesendet:</b> Dienstag, 7. März 2017 15:30<br>
<b>An:</b> 'The OpenCms mailing list' <</span><span lang="IT"><a href="mailto:opencms-dev@opencms.org"><span lang="DE" style="mso-fareast-language:DE">opencms-dev@opencms.org</span></a></span><span style="mso-fareast-language:DE">><br>
<b>Betreff:</b> [opencms-dev] error page for subfolder<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-US">Hello,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">is it possible in OpenCms 9.5 to provide a custom error page for an entire subfolder?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I know I can set an error page jsp for an entire site. This is the actual logic:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">if (cms.getStatusCode().intValue() == 500) {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> cms.forwardToErrorPage("/sites/default/500/");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">} else {<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"> cms.forwardToErrorPage("/sites/default/404/");<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">}<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">How can I check where the error originated?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Thanks <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Bye, L.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
</div>
</body>
</html>