Over a million developers have joined DZone.

Capturing Grails GSP Output

DZone's Guide to

Capturing Grails GSP Output

· ·
Free Resource
// this creates the template manually and captures the output of the GSP in a StringWriter called "writer"

def binding = [ dude : Dude.get( params.id ) ];  
def writer = new StringWriter();
def template = grailsAttributes.getPagesTemplateEngine().createTemplate("/WEB-INF/grails-app/views/dude/show.gsp", servletContext, request, response);

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}