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-tp23362830s2369p23625139.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

Reply via email to