grantmcconnaughey
grantmcconnaughey

Reputation: 10689

Grails redirecting to URL with appName as an empty map

I'm having a weird issue with a Grails 2.2.3 application where any operation that requires a redirect is going to a URL like http://localhost:8080/[:]/domain/show/1 instead of http://localhost:8080/appName/domain/show/1. Just navigating around works fine, but as soon as I do a domain operation like edit or create I get a redirect to a broken URL like the one above.

You would think that maybe I didn't have appName declared in my application.properties file, but I do (app.name=mobilefaq).

Does anyone know why this issue might be happening? If it helps, I also have the following config properties set as well:

grails.app.context = '/mobilefaq'
environments {
    development {
        grails.serverURL = "http://localhost:8080/${appName}"
    }
    test {
        grails.serverURL = "http://testserver.company.com:8080/${appName}"
    }
}

Also note, this is when running the application on the test server specifically (the issue doesn't happen in development). I am doing grails test war to create the war as well, so it shouldn't be an issue where I'm deploying in the wrong environment.

Upvotes: 2

Views: 740

Answers (1)

grantmcconnaughey
grantmcconnaughey

Reputation: 10689

The fix was actually in this StackOverflow question. I will leave this for future help (if someone searches for something like "Grails URL empty map").

Upvotes: 1

Related Questions