开发者

spring mvc simpleformcontroller - how to stop execution when exception thrown

I am using simpleformcontroller and get exception thrown in my OnSubmit method. This does not seem to stop the simpleformcontroler process as it redisplays my form.

I can see from log4j output that the exception is getting caught and forwarding to my error page as expected. I can also tell the onSubmit method does not continue after the ex开发者_Python百科ception. Which is all good.

But i do not see the error page as the simpleformcontroller starts up again and goes through processing for a new form (i can see in log4j ouput Spring log statements 'Displaying New form', 'Creating new command of class ..'. The normal form page is then displayed again.

So the problem is that the exception does not seem to terminate the SimpleFormController, it carries on to display the form again.

Anyone help? Thanks Alan

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜