You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ivan Mladenović <pi...@gmail.com> on 2010/06/03 12:54:19 UTC

How can I increase maximum upload size?

Hi,



I am using the Tomcat 6.0.26 and I try to upload file that is larger than
10000 bytes from JSP.

I try to increase the maximum upload size (for post request).

I change the Connector element:



<Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000"
redirectPort="8444" maxPostSize="500000" maxSavePostSize="500000" />



But, maximum upload size is 10000.



How can I increase maximum upload size?



Thanks in advance.



Best Regards,

Ivan

Re: How can I increase maximum upload size?

Posted by Ivan Mladenović <pi...@gmail.com>.
Hi,


I solve the problem by defining following bean:



<bean id=*"multipartResolver"*

      class=*
"org.springframework.web.multipart.commons.CommonsMultipartResolver"*

      p:maxUploadSize=*"-1"*

/>



If -1 is set for maximum upload size, then size of file will not be checked.


Best Regards,

Ivan Mladenovic




2010/6/3 Ivan Mladenović <pi...@gmail.com>

> Hi,
>
>
>
> I am using the Tomcat 6.0.26 and I try to upload file that is larger than
> 10000 bytes from JSP.
>
> I try to increase the maximum upload size (for post request).
>
> I change the Connector element:
>
>
>
> <Connector port="8081" protocol="HTTP/1.1" connectionTimeout="20000"
> redirectPort="8444" maxPostSize="500000" maxSavePostSize="500000" />
>
>
>
> But, maximum upload size is 10000.
>
>
>
> How can I increase maximum upload size?
>
>
>
> Thanks in advance.
>
>
>
> Best Regards,
>
> Ivan
>