Grails - Japanese Tag Library Refere...

Grails ?????????????? The Grails Custom Tag Library

Grails???????GSP?JSP??????????????????????????????????????

  • JSP?Java???????????GSP??????????groovy???
  • GSP??????${..} ???Groovy???(eg. test="${it=='true'}")?JSP??JSTL???????????????????????
  • JSP? TLD????????????????????????GSP??Grails ?????? ?? ????????????????????????JSTL??????????
  • GSP????????GString????????JSP?? <c:out value="${it}" /> ???????????????????
??????????????????GSP?JSP??????????????????????????????
  1. GSP????????
  2. JSP????????
{excerpt:hidden=true} 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}" />
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 {excerpt}