Jahia Dev Forum > Customize 403 forbidden...

0 (0 Good)
0 (0 Bad)

Customize 403 forbidden page

by  nabil.benabdallah@outlook.com »  2016/05/10 16:12

Hello, I want to customize the 403 error page. I find it's path (under tomcat-> webapps->root->errors) and I can modify the JSP, but what I really need is to create another one and redirect Jahia to it.

So my question is how can I redirect Jahia to a 403 page that I create under my site ?

Thanks.

  (nabil.benabdallah@outlook.com)

Number of messages  9
Registration date
0 (0 Good)
0 (0 Bad)

Re: Customize 403 forbidden page

by  shyrkov »  2016/05/10 19:56

Hello,

you could provide a site-specific error page, if you create the JSP under:

<dx-webapp-dir>/errors/sites/<your-site-key>/error_403.jsp

where <your-site-key> is the key of your site.

Similar could be done on the template set level (in that case the error page will be used for all sites, based on that template set), if the template set module (JAR) contains the page at:

errors/error_403.jsp

 

Kind regards

Sergiy

  • Re: Customize 403 forbidden page
    2016/05/10 19:56

    shyrkov <p><font color="#58585b" face="Lato, sans-serif"><span style="font-size: 16px; line-height: 28.8px;">Hello,</span></font></p> <p>you could provide a site-specific error page, if you create the JSP under:</p> <p>&lt;dx-webapp-dir&gt;/errors/sites/&lt;your-site-key&gt;/error_403.jsp</p> <p>where &lt;your-site-key&gt; is the key of your site.</p> <p>Similar could be done on the template set level (in that case the error page will be used for all sites, based on that template set), if the template set module (JAR) contains the page at:</p> <p>errors/error_403.jsp</p> <p>&nbsp;</p> <p>Kind regards</p> <p>Sergiy</p>

  • Number of messages  407
    Registration date May 10, 2016
    0 (0 Good)
    0 (0 Bad)

    Re: Re: Customize 403 forbidden page

    by  nabil.benabdallah@outlook.com »  2016/05/11 12:39

    Hello,

    Thank you Sergy for the reply however I didn't really understand. 

    What do you mean by <dx-webapp-dir>  ? is it the tomcat webapps ? 

    Can I create the error_403.jsp in edit mode in my site page tree ?

    Best regards,

    Nabil.  

      (nabil.benabdallah@outlook.com)

    Number of messages  9
    Registration date
    0 (0 Good)
    0 (0 Bad)

    Re : Re: Customize 403 forbidden page

    by  nabil.benabdallah@outlook.com »  2016/05/13 12:36

    I tested the templateSet solution and it's working :)

    Thanks.

      (nabil.benabdallah@outlook.com)

    Number of messages  9
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page