Announcement Announcement Module
Collapse
No announcement yet.
Controller not honoring app context when using a redirect Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Controller not honoring app context when using a redirect

    I'm in the process of developing a plugin that has a couple controllers in it. I'm running into the issue that if I have an app context configured in my Config.groovy, it is not honored when doing a redirect. It works fine for a render, and redirects in the app using the plugin work fine, but on a redirect from a controller in the plugin, the app context is being left off. For example:

    Config.groovy:
    Code:
    ...
    grails.serverURL = "http://localhost:8080/somecontext"
    grails.app.context = "/somecontext"
    grails.web.context = "/somecontext"
    ...
    Controller
    Code:
    ...
    redirect(action: "list")
    ...
    In the above case, if the controller is accessed via http://localhost:8080/somecontext/mycontroller/myaction the redirect sends you to http://localhost:8080/mycontroller/list (missing the somecontext).
Working...
X