2
我有这样的代码(如在Spring的参考):如何避免堆栈跟踪HTTP状态500页面MaxUploadSizeExceededException
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<!-- one of the properties available; the maximum file size in bytes -->
<property name="maxUploadSize" value="100000"/>
</bean>
当用户试图上载超过100 KB的服务器错误页面文件,HTTP状态500和堆栈跟踪会被显示。如何以最简单的方式避免这种情况?我想重定向到表单页面并显示我自己的错误消息。