开发者

Grails Views not working with .GSP

开发者 https://www.devze.com 2023-02-17 23:41 出处:网络
I have a customer controller with the generated list function. All works well if I use the scaffolded views, but once I try and access the list function on a generated view, I get no data passe开发者_

I have a customer controller with the generated list function. All works well if I use the scaffolded views, but once I try and access the list function on a generated view, I get no data passe开发者_开发百科d to the page. If I for example type in http://localhost/myproject/customer/list I get a list of customers in the database, however if I type http://localhost/myproject/customer/list.gsp I don't get any data.

I have been racking my brain and trying to find an answer in the documents, but no luck.

Thanks


See url mapping in the docs. just change list to list.gsp

e.g.:

"/product" {
controller = "product"
action = "list"
}

to:

"/product.gsp" {
controller = "product"
action = "list"
}
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号