Led & Sustained by

G2one Logo

Developed with

Intellij

Powered by

Spring

Controllers

Grails Controllers

What is a controller?

A controller handles requests and creates or prepares the response. They can generate the response or delegate to a view. To create a controller simply create a class whose name ends with "Controller" and place it within the "grails-app/controllers" directory.

The first part of your controller name is mapped to a URI and each action defined within your controller maps to URI within the controller name URI.

Controllers are request-scoped.  A new instance is created for each request. 

</