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

"Thomas Becker (JIRA)" <[email protected]>
Newsgroups gmane.comp.java.jetty.general
Message-ID <1953092045.56446.1332424024491.JavaMail.j2ee-jira@codehaus01.managed.contegix.com>
    [ 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
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.