You need to configure input
result for your action.
You could also configure fileUpload
interceptor with maximumSize
parameter for your action:
<action name="..." class="...">
<interceptor-ref name="defaultStack">
<param name="fileUpload.maximumSize">524288000</param>
</interceptor-ref>
<result name="input">error_page</result>
<result>success_page</result>
</action>
Then you can override the text of error message by using this key:
struts.messages.error.file.too.large