Reputation: 13849
I'm migrating an app from grails 1.3.6 to 2.0 and I need to change its context root. If I remember correctly, in 1.3.6 I installed the template plugin and changed:
<context-param>
<param-name>webAppRootKey</param-name>
<param-value>/newcontextroot</param-value>
</context-param>
I did the same in 2.0 with no success. Any hints ?
Thanks
Upvotes: 4
Views: 6355
Reputation: 1132
In Grails version 3.3.9 I know changing:
project/grails-app/conf/application.yml
adding
server:
contextPath: /yourcontextpath
port: 9214
will do the trick.
Upvotes: 1
Reputation: 1787
Start your grails application with this command
grails -Dapp.context=/ run-app
Upvotes: 2
Reputation: 120456
You can configure the context in Config.groovy
:
// grails-app/conf/Config.groovy
grails.app.context = '/newcontextroot'
or in application.properties
:
app.context = /newcontextroot
Upvotes: 9