错误的观点我有一个名为的LoginController用行动AUTH控制器:的Grails 1.3.7精选控制器
class LoginController {
def auth = {
render view: 'auth'
}
}
所以我去URL http://localhost:8080/myapp/login/auth,并希望看到我的看法“/login/auth.gsp” 。但我得到以下错误:
type Status report
message /myapp/WEB-INF/grails-app/views/jobSearch/auth.jsp
description The requested resource (/myapp/WEB-INF/grails-app/views/jobSearch/auth.jsp) is not available.
似乎由于某种原因,grails解决了错误的视图名称。你知道吗,发生了什么事?
class UrlMappings {
static mappings = {
"/$controller/$action?/$id?"{
constraints { // apply constraints here }
}
"/"(view:"/index") "500"(view:'/error')
}
}
你试过运行'grails clean'吗?你的代码看起来不错。 – Antoine
对URLMappings的任何更改? – omarello
URLMappings中没有任何更改 有时候,grails clean有助于。有时不。 – Maxim