struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan P Sexton <>
Subject What gives with file upload when it exceeds maxFileSize?
Date Mon, 04 Nov 2002 05:36:39 GMT

I have seen a number of questions around this topic in the archives but
no clear answers:

First everything works fine when I upload a file below the limit (set in
the controller element in struts-config.xml)

Problem occurs when I upload a file that is too big: My form bean is
very simple and just contains a FormFile. I have no validation on for
this action.

When I get into the Action, the formbean is there but the FormFile
property in the bean returns null (okay so far). I happily dump some
messages to the log before returning to mapping.findForward("cancel")
which is a forward to my main menu (which works perfectly if the file
was below the limit) and I can see that
org.apache.struts.MaxLengthExceeded has been set to true in the request

In mozilla, I get to a blank screen.

In IE 6.0 it gives me a "The page cannot be displayed. The page you are
looking for is currently unavailable."

BUT: on netscape navigator 4.7, it works fine!!!!

There are no exceptions in the log files or any other indication of what
went wrong.

I assume that the Mozilla and IE are complaining about the server
refusing to accept the file (although from the archives, I thought the
server couldn't do this). If so, how can you cleanly handle an error of
this type and give the user a nice error message?


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message