Led & Sustained by

G2one Logo

Developed with

Intellij

Powered by

Spring

Tag Library Reference

The Grails Custom Tag Library

Grails supports both GSP and JSP as view technologies. There are however some key differences between the 2 view technologies which are listed below:

  • GSP uses groovy inside scriptlets while JSP is Java
  • GSP attribute values when surrounded with the ${..} (eg. test="${it=='true'}") syntax are Groovy expressions, while in JSP these are JSTL expressions (and hence more limited)
  • JSP supports custom tag libraries through the TLD while GSP supports custom tag libraries with Grails Dynamic Tag Libraries and does not support JSTL
  • GSP supports GString expressions inside the content whilst JSP requires you to use <c:out value="${it}" />
  • GSP supports the %{-- .. --}% comment syntax as well as JSP's <%-- .. --%> syntax.

There are many shared tags but some additional ones for both GSP (mainly groovy syntax tags) and JSP hence we have 2 reference sections:

  1. GSP Tag Reference
  2. JSP Tag Reference
</