0

I'm a beginner with Spring MVC. I'm working on implementing the HandlerExceptionResolver interface in a controller so that it can catch a MaxUploadSizeExceededException. During this exception, I want to redirect the user to the original page, which was a generic view page for a specific record id.

The original id is passed in a model when uploading the file. Yet when it reaches the resolveException method, it seems I no longer have access to that model.

Is there a way to redirect the user to the original view by retrieving the id of the model?

The tricky part with this, it seems, is that this particular type of exception occurs before it reaches the controller. So I can't use a try/catch block within the controller.

4

1 に答える 1

0

コメントに記載されているように、現在、maxfilesize 例外が発生すると、ユーザーを一般的なエラー メッセージ ページにリダイレクトしています。当面の間、この回答を正しいものとしてマークします。

于 2013-12-30T15:44:55.203 に答える