0

I want to upload a file(zipped excel) in my application. The file size is almost 8MB. So it gives size error.

I have tried to upload a small file, it works fine. But for size> 1 MB, it does not work.

Is there any work around for uploading big (zipped) files???

I am using Struts 1.x framework.

Thanks in advance!

Rahul_Java
  • 13
  • 1
  • 7
  • 1
    What is the exception? Could you please elaborate "it doesn't work"? – Shashi Feb 08 '13 at 07:41
  • @shahi bhushan- "It doesn't work" means I am not able to upload a Bigger file. size >1MB. It keeps on trying to upload but fails at the end. – Rahul_Java Feb 08 '13 at 07:49

1 Answers1

0

From http://tomcat.apache.org/tomcat-5.5-doc/config/http.html

maxPostSize

The maximum size in bytes of the POST which will be handled by the container FORM URL parameter parsing. The limit can be disabled by setting this attribute to a value less than or equal to 0. If not specified, this attribute is set to 2097152 (2 megabytes).

Locate server.xml in {Tomcat installation folder}\ conf \

8*1024*1204 =8388608

<Connector port="8080" protocol="HTTP/1.1"  connectionTimeout="20000"         
redirectPort="8443" maxPostSize="8388608" />

Put the limit in maxPostSize..

Shashi
  • 12,487
  • 17
  • 65
  • 111