Search code examples
grailslayoutsitemeshfacebook-page

Render a page in grails without html and body tag


I want to render a page in grails without a <html>, <head> and <body> tag, I just want DIV and tables.

I want to integrate this page in my Facebook page and the requirement of Facebook page is that the page should not contain <html>, <head> or <body> tags.


Solution

  • You can use a gsp-template (GSP file name start with '_'). Than you can call you controller an use the render method.

    class MyDomainController{
        def myAction = {
           ...
           render(template:'myTemplate', model: ...)
        }
    }