Grails Views with Groovy Server Pages
Grails uses Groovy Server Pages (GSP) for its view layer. If you’ve ever worked with JavaServer Pages, well, you have my sympathy, but GSP will seem familiar—only easier to work with. Grails also uses SiteMesh,[36] the page decoration framework from OpenSymphony, to assist in the page layout. SiteMesh will merge each of our .gsp files into a file called main.gsp (located in TekDays/grails-app/views/layouts. This is what gives a consistent look to all of our pages, as we saw with the dynamic scaffolding. We’ll begin our tour of the generated views with main.gsp, followed by the four views and the template generated for the TekEvent class. Then we’ll look at a couple of the other views that take advantage ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access