cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <>
Subject Re: Cocoon 2.2 Samples Setting MultipartFilter Max Upload Size
Date Fri, 08 Dec 2006 13:15:05 GMT
Patrick Refondini schrieb:
> Using cocoon-samples.war I try to set up the max upload size.
> Looking at the source I thought the right place to do it is in the 
> o.a.c.servlet.multipart.MultipartFilter thus in web.xml :
>    <filter>
>      <filter-name>CocoonMultipartFilter</filter-name>
>      <display-name>Cocoon multipart filter</display-name>
>      <description>Multipart MIME handling filter for Cocoon</description>
> <filter-class>org.apache.cocoon.servlet.multipart.MultipartFilter</filter-class>
> Added this:
>  >>>>
>      <init-param>
>        <param-name>maxUploadSize</param-name>
>        <!-- Expect to set up 200M -->
>        <param-value>200000000</param-value>
>        <description>Set the size limit for uploaded files.</description>
>      </init-param>
> <<<<
>    </filter>
> It does not work. Any hint welcome.

You have to set the configuration filter in the settings for Cocoon,
which means you have to define them via properties.

Have a look at the file in the cocoon-core module. Just
put a properties file with the appropriate configuration into
WEB-INF/cocoon/properties. This should work.

> I use cocoon-samples.war built from latest cocoon_trunk deployed in 
> Tomcat 5.5.20 container.
> I have been able to change the max upload size for the same webapp using 
> maven jetty plugin in the command line like:
> mvn -Dorg.apache.cocoon.uploads.maxsize=200000000 jetty:run
Yes, you can override the properties on startup by specifying system

In general I think we should rather use filter parameters here and not
the Cocoon settings object.



Carsten Ziegeler - Chief Architect

View raw message