0

I'm converting an app from grails 2.5.2 to 3.0.10. In many controllers and oher places I do

redirect(url: "/my/url", permanent: true)

I have set the context path in application.groovy:

server.'context-path' = '/myapp'

When the redirect is called, the redirect is coming through as /my-app-dir/my/url install of /myapp/my/url

Why is grails 3.0.10 using the application directory in the url instead of context-path? I am running this via grails clean; grails run-app

1 Answers1

0

After running it through the debugger, it turns out you must also set:

grails.serverURL= "http://localhost:8080/myapp"

In application.groovy for redirects to work properly.