Jetty
  1. Jetty
  2. JETTY-1496

404 error page doesn't render layout template

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 7.6.1
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      I've a Grails 2.0.1 application. I set up the following UrlMapping:

      "/"(controller:"home")
      "500"(view:'/error/serverError')
      "404"(view:'/error/notFound')

      This is my notFound.gsp page:

      <%@ page contentType="text/html;charset=UTF-8" %>
      <html>
      <head>
      <meta name="layout" content="main"/>
      <title>404 Not Found</title>
      </head>

      <body>
      <h2>Page not found</h2>
      <p>Back to <a href="$

      {createLink(uri:'/')}

      ">homepage</a></p>
      </body>
      </html>
      While developing (under Tomcat) the 404 error page renders correctly main layout template. But when I deploy the war in production under Jetty 7.6.2 and I browse to a non-existing url I get the 404 error page but without the main layout template.

      So it seems that Grails 2.0.1 doesn't play well with Jetty and the application can't render the template when a 404 error is hit. Under Tomcat works fine.

        Activity

          People

          • Assignee:
            Thomas Becker
            Reporter:
            Luca C.
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: