I would like to have a zip or something published somewhere to see what you actually did. Thanks
On Thu, May 21, 2009 at 5:29 PM, rfisk <rick.f...@gmail.com> wrote: > > We are sheepishly correcting some bad information here. > > What we thought was an error only on one platform was our poor debugging. > It > only looks like its working correctly in the tomcat sandbox because the > network is very fast. > > In all cases, tomcat appears to take over the file upload and then throw > the > 500 on the redirect. > > We "fixed" the issue by assigning a controller to handle the error and > redirect to "/pu_error" rather than just redirecting to the jsp. > > This required us to also move error handling jsp page (just a page to > capture the error message) to WEB-INF/pages/ and to map the jsp to the > controller. The benefit of this is that we can messagise the error message > and re-use the page for other errors if we require it later. > > However, while it resolves the 500 error, it does not prevent the entire > file from being uploaded. > > > rfisk wrote: > > > > I think you are doing things correctly. > > > > We also have the same problem. However, we may have some information that > > will help. And maybe somebody can help us too... :) > > > > In our sandbox, this works perfectly in both jetty and tomcat. When we > > deployed it to production however, it broke. The only obvious difference > > we considered was apache and mod_proxy_ajp on the front end. > > > > But, one of our developers, when attempting to debug the problem put > > tomcat and apache together on a WINDOWS box. The exception was caught and > > the redirect was handled perfectly just as in our sandbox....also > Windows. > > > > So we did a little testing directly on port 8080, and were able to > > reproduce in production. Production is tomcat 5.5.26 on Centos5.2. > > > > > > Another test server running tomcat 6.0.18 has the same issue. The > > exception is caught, but the redirect fails. > > > > Running tcpdump (I don't have a sniffer) I discovered that the file > upload > > is still occurring in spite of the thrown exception (when file size limit > > is exceeded). > > > > So what would cause the difference in behavior between tomcat on windows > > and tomcat on linux? > > > > My suspicion is that there is some weird thread issue where the thread > > that is uploading the file is never terminated or notified that an error > > has occurred and thus just ends up being reset after the file upload is > > complete and a 500 error because it has no place to go. > > > > > > > > > > > > Carlos Ortiz-4 wrote: > >> > >> Hi everyone > >> > >> I don't know if any of you have come across the following annoying > >> situation. > >> I am using Spring Framework 2.5.5 using Spring Web MVC and Spring JDBC, > >> using Eclipse WTP and Tomcat, but the feature I am trying to control is > >> the > >> FileUpload process. > >> Well I have set everything to work with the Commons File upload > >> integration > >> and everything is fine for uploading the file except when it is time to > >> control the exception handling MaxUploadSizeExceededException. I > >> implemented > >> an Exception Resolver for this to redirect to my page and telling the > >> form > >> that it was not valid, I have set a breakpoint and noticed that Spring > >> uses > >> the class but no redirection is done, as the Servlet container has > >> trapped > >> the HTTP error code 500. > >> > >> Searched google but found no solution to work. > >> Have anyone of you found a workaround to this very annoying problem? > >> > >> Thanks in advance > >> > >> > > > > > > -- > View this message in context: > http://www.nabble.com/Handling-MaxUploadSizeExceededException-tp23362830s2369p23661420.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 > >