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!

4

1 に答える 1

0

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

maxPostSize

コンテナのFORMURLパラメータの解析によって処理されるPOSTの最大サイズ(バイト単位)。この属性を0以下の値に設定することにより、制限を無効にすることができます。指定されていない場合、この属性は2097152(2メガバイト)に設定されます。

{Tomcatインストールフォルダ}\conf\でserver.xmlを見つけます

8 * 1024 * 1204 = 8388608

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

maxPostSizeに制限を設定します。

于 2013-02-08T08:59:31.993 に答える