Jahia DX > 401 404 403 custom...

0 (0 Good)
0 (0 Bad)

401 404 403 custom pages in 6.5

by  etugarev »  2011/06/07 18:07

How to create custom error pages in jahia 6.5? Is it possible somehow to have them on a template level?
  • 401 404 403 custom pages in 6.5
    2011/06/07 18:07

    etugarev How to create custom error pages in jahia 6.5? Is it possible somehow to have them on a template level?

  • Number of messages  3
    Registration date Jun 7, 2011
    0 (0 Good)
    0 (0 Bad)

    Re: 401 404 403 custom pages in 6.5

    by  robertito »  2011/06/07 18:07

    Hi etugarev,

    I'm trying to figure out the same issue and found the JSP pages for errors 400, 401, 403, 404 here:

    YOUR_INSTALLATION/Jahia_65_BETA3_DEMOPACK/tomcat/webapps/ROOT/errors/error_40*.jsp

    I think this pages have to be modified. I also think they are redirected by class org.jahia.bin.errors.ErrorServlet, but I'm not sure about it.

    There is this method, which seems to get the right page:

    protected String getErrorPagePath(HttpServletRequest request, 
                HttpServletResponse response) throws ServletException, IOException {
    
            String path = null;
            String page = request.getParameter("page");
            int errorCode = getErrorCode(request);
    
            if (null == page) {
                page = "error_" + errorCode + ".jsp";
            }
    
            ... // method continues here
    }

    Could you find already something about this?

    Kind Regards,

    Robert

  • Re: 401 404 403 custom pages in 6.5
    2011/06/30 13:06

    robertito <p> Hi etugarev,</p> <p> I&#39;m trying to figure out the same issue and found the JSP pages for errors 400, 401, 403, 404 here:</p> <p> YOUR_INSTALLATION/Jahia_65_BETA3_DEMOPACK/tomcat/webapps/ROOT/errors/error_40*.jsp</p> <p> I think this pages have to be modified. I also think they are redirected by class org.jahia.bin.errors.ErrorServlet, but I&#39;m not sure about it.</p> <p> There is this method, which seems to get the right page:</p> <pre> protected String getErrorPagePath(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String path = null; String page = request.getParameter(&quot;page&quot;); int errorCode = getErrorCode(request); if (null == page) { page = &quot;error_&quot; + errorCode + &quot;.jsp&quot;; } ... // method continues here }</pre> <p> Could you find already something about this?</p> <p> Kind Regards,</p> <p> Robert</p>

  • Number of messages  13
    Registration date Jun 7, 2011
    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