Grails: Get context path in BootStrap.groovy
How can I get the context path in the BootStrap.groovy file of a Grails a开发者_如何学Gopplication?
Can't you do:
class BootStrap {
def init = { servletContext ->
println "$servletContext.contextPath"
}
def destroy = {
}
}
精彩评论