Can I have a circular redirect in Grails? -


i'm trying redirect circularly in grails (no infinite redirect loop) , keep getting error:

org.codehaus.groovy.grails.web.servlet.mvc.exceptions.cannotredirectexception: cannot issue redirect(..) here. response has been committed either redirect or directly writing response.

i trying redirect action on controller redirect back. wondering why grails not allowing this.

//initial action , final redirect location def showstuff = {         if (flash.neatstuff){              return render("found neat stuff")         } else if (params.email) {             return redirect(action:'getneatstuff',params:[email:params.email, emailonly:true])         }         return render("unable find stuff, use param")     }  def getneatstuff = {         flash.neatstuff = new date()         if (params.emailonly){               redirect(action:'showstuff')         }         redirect(action:'someotherplace') } 

ok, had total brain fart. corrected code below in case runs same error. racking brain looking @ other things, wasn't returning redirect on action.

def getneatstuff = {         flash.neatstuff = new date()         if (params.emailonly){               return redirect(action:'showstuff')         }         redirect(action:'someotherplace') } 

Comments

Popular posts from this blog

php - What is the difference between $_SERVER['PATH_INFO'] and $_SERVER['ORIG_PATH_INFO']? -

fortran - Function return type mismatch -

queue - mq_receive: message too long -