Grails

Executing Groovy scripts at runtime

A very useful Groovy class GroovyScriptEngine can be used to execute Groovy scripts at runtime. For understanding purpose, lets start with an example. We have a script named as Area.groovy that calculates the area of circle. [java] // Area.groovy Float r = "${radius}".toFloat() //radius will be passed as an...

by Divya Setia
Tag: GroovyScriptEngine
25-Sep-2012