See the light - agile, industrial strength, rapid web application development made easy

(Quick Reference) # 8.3.6 Using JSP Tag Libraries - Reference Documentation Authors: Graeme Rocher, Peter Ledbrook, Marc Palmer, Jeff Brown, Luke Daley, Burt Beckwith, Lari Hotari Version: 2.4.3 ## 8.3.6 Using JSP Tag Libraries In addition to the simplified tag library mechanism provided by GSP, you can also use JSP tags from GSP. To do so simply declare the JSP to use with the `taglib` directive:
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
Besides this you have to configure Grails to scan for the JSP tld files. This is configured with the `grails.gsp.tldScanPattern` setting. It accepts a comma separated String value. Spring's PathMatchingResourcePatternResolver is used to resolve the patterns. For example you could scan for all available tld files by adding this to Config.groovy:
    grails.gsp.tldScanPattern='classpath*:/META-INF/*.tld,/WEB-INF/tld/*.tld'
JSTL standard library is no more added as a dependency by default. In case you are using JSTL, you should also add these dependencies to BuildConfig.groovy:
    runtime 'javax.servlet:jstl:1.1.2'
            runtime 'taglibs:standard:1.1.2'
Then you can use JSP tags like any other tag:
    <fmt:formatNumber value="${10}" pattern=".00"/>
With the added bonus that you can invoke JSP tags like methods:
    ${fmt.formatNumber(value:10, pattern:".00")}
| Quick Reference (hide)