(Quick Reference)

2 GSP Considerations - Reference Documentation

Authors: Grails Plugin Collective

Version: 1.0.0

2 GSP Considerations

There are a few things that you do need to be aware of when writing GSPs to be rendered via this plugin.

Link resources must be resolvable

All links to resources (e.g. images, css) must be accessible by the application . This is due to the linked resources being accessed by application and not a browser. Depending on your network config in production, this may require some special consideration.

The rendering engine resolves all relative links relative to the grails.serverURL config property.

Must be well formed

The GSP must render to well formed, valid, XHTML. If it does not, a grails.plugin.rendering.document.XmlParseException will be thrown.

Must declare DOCTYPE

Without a doctype, you are likely to get parse failures due to unresolvable entity references (e.g.  ). Be sure to declare the XHTML doctype at the start of your GSP like so ...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">