Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/357.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Redirect 重定向到GSP失败_Redirect_Grails_Uri - Fatal编程技术网

Redirect 重定向到GSP失败

Redirect 重定向到GSP失败,redirect,grails,uri,Redirect,Grails,Uri,我正在使用Grails2.4.5 在我的grailsapp/views目录中,我有一个名为“test.gsp”的简单文件。它的内容是平凡的GSP/HTML: <html> <head> <meta name="layout" content="main" /> <title>TEST</title> <style> <

我正在使用Grails2.4.5

在我的grailsapp/views目录中,我有一个名为“test.gsp”的简单文件。它的内容是平凡的GSP/HTML:

<html>
    <head>
            <meta name="layout" content="main" />
            <title>TEST</title>
            <style>
            </style>
    </head>
    <body>
            <h1>TEST</h1>
    </body>
</html>
但每当到达这一行时,grails就会将我发送到404处理程序

我尝试启用UrlMapping日志记录,结果显示:

DEBUG mapping.DefaultUrlMappingsHolder  - Matched URI [/test.gsp] with pattern [/(*)/(*)?/(*)?(.(*))?], adding to posibilities

我确信我以前在Grails中也使用过这个。我遗漏了什么愚蠢的东西?

您应该呈现一个视图,而不是试图重定向到(可能未映射)uri。 尝试:


您应该呈现一个视图,而不是试图重定向到(可能未映射)uri。 尝试:

DEBUG mapping.DefaultUrlMappingsHolder  - Matched URI [/test.gsp] with pattern [/(*)/(*)?/(*)?(.(*))?], adding to posibilities
render(view: "test")