私の環境:
java version "1.6.0_38"
Grails 2.1.1
grails create-app test
cd test<br>
grails create-controller com.test.Test
には特別な設定はありませんUrlMapping
。
com.test.TestController
:
package com.test
class TestController {
def getA(){
def ret = []
println "in getA"
render ret
}
def index() {
println "in index"
render view:"index"
}
}
grails-app/test/index.gsp:
<html>
<body> hello </body>
</html>
[ http://HOSTNAME/PRJNAME/test/index
]にアクセスしようとすると、次の
ようになると思います:
HTML:
<html> <body> hello </body> </html>
コンソール :
索引内
HTML: []< html
> <body> hello </body> </html>
コンソール :
getA
のインデックス内
どうして??