0

こんにちは、使用してリダイレクトしようとしてredirect(uri: "/errors/handle500")いますが、次の例外が発生しています

Cannot issue a redirect(..) here. A previous call to redirect(..) has already redirected the response.. Stacktrace follows:
  org.codehaus.groovy.grails.web.servlet.mvc.exceptions.CannotRedirectException: Cannot issue a redirect(..) here. A previous call to redirect(..) has already redirected the response.
  at com.cisco.rms.ErrorsController$_closure1.doCall(ErrorsController.groovy:8)
2012-10-03 18:05:53,414 [http-bio-8080-exec-7] ERROR errors.GrailsExceptionResolver  - CannotRedirectException occurred when processing request: [GET] /rmsportal/changeRequest/listJSONFromService 

リダイレクトしない理由を教えてください。

4

2 に答える 2

0

tim_yates は正しく、2 番目のリダイレクトを呼び出すことはできません。代わりにforwardを使用したいかもしれませんが、リダイレクトだけでは grails が残りのコントローラー コードの実行を停止するわけではないことに注意してください。

于 2012-10-03T16:47:05.677 に答える