redirect « grails « Java Enterprise Q&A





1. Can a webflow's action state have multiple redirects on success?    stackoverflow.com

Say, I have this type of webflow:

def myFlow = {
    state1 {
    }
    on("next").to("stateAct")

    stateAct {
    ...

2. How to redirect depending of the role with Grails Acegi on weblogic    stackoverflow.com

in my index.gsp, I have this :

<g:ifAnyGranted role="IS_AUTHENTICATED_ANONYMOUSLY">
  <% response.sendRedirect("login/auth"); %>
</g:ifAnyGranted>
<g:ifAnyGranted role="ROLE_ADMIN">
  <% response.sendRedirect("admin/tasks"); %>
</g:ifAnyGranted>
<g:ifAnyGranted role="ROLE_VIEWER_I, ROLE_VIEWER_E">
  <% response.sendRedirect("items/list"); %>
</g:ifAnyGranted>
If I run it on tomcat, that's work ...

3. Grails Web Flow: Redirect to the webflow from another controller action?    stackoverflow.com

Here's what I think I want to do:

class MyController {
    def goToWizard = {
        if (params.option1)
      ...

4. Grails Acegi : Redirection on a ajax method and not on the webpage. Why?    stackoverflow.com

I use Acegi with grails but I have a problem with a redirection. I define in UrlMapping this :

"/" { 
  controller = "mycontroller"
  action = "myaction"
}
In mycontroller : ...

5. Grails, Weblogic and redirection on root "/" seems not working    stackoverflow.com

I configured my grails application with an root path like this (in UrlMapping):

"/"{
    controller="mycontroller"
    action="myaction"
 }
in mycontroller.myaction, depending of the role, I redirect to ...