deamon
deamon

Reputation: 92427

Grails: Get context path in BootStrap.groovy

How can I get the context path in the BootStrap.groovy file of a Grails application?

Upvotes: 1

Views: 2985

Answers (1)

tim_yates
tim_yates

Reputation: 171084

Can't you do:

class BootStrap {
  def init = { servletContext ->
    println "$servletContext.contextPath"
  }
  def destroy = {
  }
}

Upvotes: 6

Related Questions