I am a little crazy about this.
At first, my mapping is like below
"500"(view:'/error/exception')
But, then we found, if the exception is throw in Spring Security code, the error page is not correct. By looking the source code, I change the mapping from view to action
"500"(controller: "error", action: "exception")
and, in the action I will send a redirect request to another action which will render view. Seems everything work.
However, today I found if the request which cause exception is GET, it works, if it is a POST, then nothing rendered, it just return 404 to browser.
Could anybody tell me how to walkaround it?
Found a walkaround.
Config mapping as:
In the view, write an redirect
Then , render view in the ErrorControl, exception action.
Waiting for better solution.