[jetty-dev] [jira] (JETTY-1496) 404 error page doesn't render layout template

"Luca C. (JIRA)" <[email protected]>
Newsgroups gmane.comp.java.jetty.general
Message-ID <12817268.51415.1331712423110.JavaMail.j2ee-jira@codehaus01.managed.contegix.com>
    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294078#comment-294078 ] 

Luca C. commented on JETTY-1496:
--------------------------------

Reproducing it's pretty easy. Just create a new grails app and edit the two files as in the bug description. These are the steps;

1. grails create-app testapp
2. vim conf/UrlMappings.groovy and add the following line: "404"(view:'/notFound')
3. create grails-app/view/notFound.gsp page
4. grails run-app

at this point we're in development Tomcat and if I browse to http://localhost:8080/testapp/lklkj (non-existant url) I get the 404 error page rendered with the default grails template

5. grails war

Now I move the war to production running Jetty(7.6.2.v20120308), I browse to the same non-existant url and I get the 404 error page but *without* the default template.
In start.log I see just this:

2012-03-14 08:57:04.167:INFO:/:Initializing Spring FrameworkServlet 'grails-errorhandler'

The sample application is 26 MB, where can I upload it ?
                
> 404 error page doesn't render layout template
> ---------------------------------------------
>
>                 Key: JETTY-1496
>                 URL: https://jira.codehaus.org/browse/JETTY-1496
>             Project: Jetty
>          Issue Type: Bug
>    Affects Versions: 7.6.1
>            Reporter: Luca C.
>            Assignee: Thomas Becker
>
> 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.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.