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

classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
Luca C. created JETTY-1496:
------------------------------

             Summary: 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.


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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org

     [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Bartel reassigned JETTY-1496:
---------------------------------

    Assignee: Jan Bartel
   

> 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: Jan Bartel
>
> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294072#comment-294072 ]

Jan Bartel commented on JETTY-1496:
-----------------------------------

Do you have a small example grails webapp that I can use to reproduce?

Also, are there any errors in the jetty logs?

thanks
Jan
               

> 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: Jan Bartel
>
> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

     [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jan Bartel reassigned JETTY-1496:
---------------------------------

    Assignee: Thomas Becker  (was: Jan Bartel)

Thomas,

Can you take a look at this issue?

thanks
Jan
               

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294080#comment-294080 ]

Thomas Becker commented on JETTY-1496:
--------------------------------------

Yes, I will take care of it. I remember that this worked fine in a grails project I've been working on last year.

@Luca: I will try to create the test app myself. If I'm having troubles I will get back to you to send me your sample app.
               

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294672#comment-294672 ]

Thomas Becker commented on JETTY-1496:
--------------------------------------

I can confirm that the issue can be reproduced as described.

grails precompiles the gsp files and puts them into the war's WEB-INF/classes directory. However when forwarded to an error page the template layout is not rendered in jetty. index.gsp works fine though.
At the moment I can't tell if this is a jetty issue, a grails issue or grails using some tomcat specific servlet spec differences.

I will dig a bit deeper on how grails' errorhandler works and how the templates are supposed to work.
               

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294715#comment-294715 ]

Thomas Becker commented on JETTY-1496:
--------------------------------------

I've tried grails 1.3.7. The standard error.gsp doesn't contain a layout meta tag. So I've "cp error.gsp notFound.gsp" pasted the meta tag for the layout from index.gsp to notFound.gsp and...it works fine with grails 1.3.7.
               

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294747#comment-294747 ]

Thomas Becker edited comment on JETTY-1496 at 3/21/12 6:46 AM:
---------------------------------------------------------------

I can't see any misbehaviour within jetty and this is going quite deep into grails internals. So I raised this issue for now trying to get some help as I'm stuck:

http://jira.grails.org/browse/GRAILS-8935
               
      was (Author: tbecker):
    I can't see any misbehaviour within jetty and this is going quite deep into grails internals. So I raised this issue for now:

http://jira.grails.org/browse/GRAILS-8935
                 

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294747#comment-294747 ]

Thomas Becker commented on JETTY-1496:
--------------------------------------

I can't see any misbehaviour within jetty and this is going quite deep into grails internals. So I raised this issue for now:

http://jira.grails.org/browse/GRAILS-8935
               

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294748#comment-294748 ]

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

Thank you Thomas for your time spent in analysis. I should have opened this issue against grails. Anyway thanks. Luca
               

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294750#comment-294750 ]

Thomas Becker commented on JETTY-1496:
--------------------------------------

Luca, you're welcome. However I'm not 100% certain yet that this is a grails issue. It just seems to me atm that it is, but as I'm not a grails expert I need support from the grails folks. Lets see what they come up with.
               

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org

    [ https://jira.codehaus.org/browse/JETTY-1496?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=294862#comment-294862 ]

Thomas Becker commented on JETTY-1496:
--------------------------------------

For the record here's the html generated:

{code:title=grails run-app}
<!doctype html>
<!--[if lt IE 7 ]> <html lang="en" class="no-js ie6"> <![endif]-->
<!--[if IE 7 ]>    <html lang="en" class="no-js ie7"> <![endif]-->
<!--[if IE 8 ]>    <html lang="en" class="no-js ie8"> <![endif]-->
<!--[if IE 9 ]>    <html lang="en" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="en" class="no-js"><!--<![endif]-->
        <head>
                <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
                <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
                <title>Grails Runtime Exception</title>
                <meta name="viewport" content="width=device-width, initial-scale=1.0">
                <link rel="shortcut icon" href="/testapp/static/images/favicon.ico" type="image/x-icon">
                <link rel="apple-touch-icon" href="/testapp/static/images/apple-touch-icon.png">
                <link rel="apple-touch-icon" sizes="114x114" href="/testapp/static/images/apple-touch-icon-retina.png">
                <link rel="stylesheet" href="/testapp/static/css/main.css" type="text/css">
                <link rel="stylesheet" href="/testapp/static/css/mobile.css" type="text/css">
               
               
                <meta name="layout" content="main">
                <link rel="stylesheet" href="/testapp/static/css/errors.css" type="text/css">
       
       
        </head>
        <body>
                <div id="grailsLogo" role="banner"><a href="http://grails.org"><img src="/testapp/static/images/grails_logo.png" alt="Grails"/></a></div>
               
    HUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
               
       
                <div class="footer" role="contentinfo"></div>
                <div id="spinner" class="spinner" style="display:none;">Loading&hellip;</div>
               
        <script src="/testapp/static/js/application.js" type="text/javascript" ></script>

        </body>
</html>{code}

{code:title=jetty}
<!doctype html>
<html>
        <head>
                <title>Grails Runtime Exception</title>
                <meta name="layout" content="main">
                <link rel="stylesheet" href="/testapp-0.1/static/css/errors.css" type="text/css">
        </head>
        <body>
    HUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU
               
        </body>
</html>{code}

The same page in jetty is just not being decorated with the layout accordingly when it was a forward to an error page.
               

> 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


Reply | Threaded
Open this post in threaded view
|

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

JIRA jira@codehaus.org
In reply to this post by JIRA jira@codehaus.org
Jan Bartel closed Bug JETTY-1496 as Duplicate

This issue was moved to jetty eclipse bugzilla: https://bugs.eclipse.org/bugs/show_bug.cgi?id=396568

Change By: Jan Bartel (13/Dec/12 10:08 PM)
Resolution: Duplicate
Status: Open Closed
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
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