I have a Grails 2.0 webapp and when I try to go to an url, for example http://localhost:8080/${myapp}/controller/action it always redirects to http://localhost:8080/controller/action without the name of my webapp. This is my UrlMappings.groovy
class UrlMappings {
static mappings = {
"/$controller/$action?/$id?"{
constraints {
// apply constraints here
}
}
"/"(controller:"/admin")
"500"(view:'/error')
}
}
And this is my application.properties
#Grails Metadata file
#Thu Feb 09 12:22:14 CET 2012
app.grails.version=2.0.0
app.name=appname
app.servlet.version=2.4
app.version=0.1
plugins.hibernate=2.0.0
plugins.tomcat=2.0.0
any suggestions why it redirects to the wrong url?
thanks for your time
grails.app.context="/appname"
in yourConfig.groovy
? – seth.miller