Hi Carlos...have u able to resolve this problem.? I am also using spring 2.5(with annotation) and facing same MaxUploadSizeExceededException while file uplaoding. I tell you what I did yet:
I am able to catch the MaxUploadSizeExceededException exception in exception handler class but cannot redirect the same view with error mesaage. After return from handler class, it throws same 500 internal error. %-O > public class MaxUploadSizeExceededExceptionHandler implements > HandlerExceptionResolver { > > public ModelAndView resolveException(HttpServletRequest request, > HttpServletResponse response, Object handler, > Exception e) { > if (e instanceof MaxUploadSizeExceededException) { > int pos = request.getPathInfo().lastIndexOf('/'); > String rootPath = request.getPathInfo().substring(0, > pos+1); > return new ModelAndView("redirect:" + > rootPath+"index?"); > //return new ModelAndView("index"); > > } else { > return null; > } > } > > > } > Spring configuration in application-servlet.xml > <bean id="maxUploadSizeExceededExceptionHandler" > class="com.mediamath.ignition.campaign.web.MaxUploadSizeExceededExceptionHandler"/> > > > <bean id="multipartResolver" > class="org.springframework.web.multipart.commons.CommonsMultipartResolver"> > <!--Max size in bytes. --> > <property name="maxUploadSize" value="500000"/> > </bean> > Could you ( or anybody) guide me to redirect to the same view with error message. Thanks in advance.:working: -- View this message in context: http://www.nabble.com/Handling-MaxUploadSizeExceededException-tp23362830s2369p23649049.html Sent from the AppFuse - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@appfuse.dev.java.net For additional commands, e-mail: users-h...@appfuse.dev.java.net