在Grails应用程序中,偶尔会在日志中看到"无法发出重定向":
2011-04-27 12:18:40,469 [TP-Processor13]错误GrailsExceptionResolver - 无法在此处发出重定向(..).之前对重定向(..)的调用已经重定向了响应.org.codehaus.groovy.grails.web.servlet.mvc.exceptions.CannotRedirectException:无法在此处发出重定向(..).之前对重定向(..)的调用已经重定向了响应.在com.coach.LoginController $ _closure2.doCall(LoginController.groovy:90)...
不知道如何追踪这一点.任何想法或建议?
托德
Sac*_*and 17
检查登录控制器; 看起来你重定向后没有从动作返回.例如:
if (some condition) {
redirect ()
return // should return from here to finish the action, otherwise the rest of the code will be executed
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
7603 次 |
| 最近记录: |