We can use GSP without Grails, just mapping servlet groovy.servlet.TemplateServlet
.
And what about TagLibs?
Here are docs about using TagLibs with Grails - we should just add class to grails-app/taglib
folder.
Is it possible to create custom GSP tag without Grails? And if it possible, even more important question, how exactly can it be done?
UPDATE: it looks like there is a separate Grails Plugin for it - https://github.com/houbie/gsp-taglib. So the question actually boils down to how we can use code from this plugin I guess.
According to http://jira.grails.org/browse/GRAILS-5657 full GSPs independent of Grails is (as of September 2012) a feature yet to come. Some minimal versions have been done though
来源:https://stackoverflow.com/questions/8259332/how-to-create-gsp-taglib-without-grails