Hi Nils-H ,

for the above issue, i had used "interceptor" tag in struts config xml and the mapping is given below,

<constant name="struts.multipart.maxSize" value="10000000" />
<action name="importDCMeterXLSFile"
class="com.echelon.nem.client.configuration.struts.ImportDcMeterAction"
               method="readXLSFile">
               <interceptor-ref name="fileUpload">
                   <param name="maximumSize">5203070</param>
               </interceptor-ref>
<result name="success">/configuration/ImportDCMeter.jsp</result>
       </action>

and in JSP i am using <s:file name="fileUpload" label="File" size="20" onkeypress = "killEnter(event)"/> with encrypt type
enctype="multipart/form-data".

I am trying to upload a 3MB file.
But i am getting exception "File too large" and returns Null in my action.

Can any one suggest the solution for this issue.

Thanks,
Mageshwaran P.

Nils-Helge Garli Hegvik wrote:
Check the "maximumSize" parameter in the FileUploadInterceptor:
http://struts.apache.org/2.1.6/docs/file-upload-interceptor.html

Nils-H

On Thu, Mar 26, 2009 at 7:36 AM, Mageshwaran <mageshwa...@dhyanit.com> wrote:
Hi All,

I am using strust2* "s:file" *attribute tag for file upload to server. I am
getting the following Exception,

2009-03-26 11:48:40,968 ERROR [Class]
org.apache.commons.fileupload.FileUploadBase$SizeLimitExceededException: the
request was rejected because its size (3203060) exceeds the configured
maximum (2097152)
2009-03-26 11:48:40,968 ERROR [Class] the request was rejected because its
size (3203060) exceeds the configured maximum (2097152)
2009-03-26 11:48:41,109 ERROR [Class] Could not find action or result

Can any one guide me how to solve this issue and to configure the size for
file upload.

Thanks in advance,
Mageshwaran P.



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to