How To Get the Action and Controller Names in a GSPs

It’s 2am, but I’m on a roll (though my typing is suffering somewhat and focussing has started to become an effort) and I’ve just discovered how to get the action and controller names in a Grails GSP.It’s as simple as:

Action name: ${actionName}
Controller name: ${controllerName}

It’s a feature that’s only available in 1.2 and it doesn’t seem to appear in the user guide (at least not any place where I’ve been looking). I found it in JIRA.

Now, back to work. Or maybe bed…

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s