我的Grails项目结构:
my-app/
grails-app/
<mostly typical grails-app structure>
views/
web/
index.gsp
app/
admin/
layouts/
main.gsp
<rest of project structure is like any other Grails app>
因此,
我在我的main.gsp中包含了一个部分模板。
对于站点上的每个控制器/页面,这部分内容将略有不同。因此,对于每个视图目录,我将有一个单独的_headerDetails.gsp。
除了默认的应用程序index.gsp之外,它工作得很好。当我在根视图目录下包含一个_headerDetails.gsp时,我会得到以下错误:
org.codehaus.groovy.grails.web.pages.exceptions.GroovyPagesException: Error processing GroovyPageView: Template not found for name [headerD
我正在尝试使用IntelliJ Idea CE作为开发Grails web应用程序的编辑器。我创建了一个GSP文件
<!DOCTYPE html>
<html>
<head>
<title>Main</title></head>
<body>Welcome, to my online forum, the date today is ${date}
</body>
</html>
并且试图格式化是使用ctrl+alt+L,但什么也没有发生。
我的问题
我们能用.gsp的想法格式化Int