cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <gkossakow...@apache.org>
Subject Re: "upload-max-size" with no effect
Date Mon, 28 Jan 2008 13:35:02 GMT
Jean-Claude Vogel pisze:
> Thank a lot,
> 
> I fact I don't know how to set static variables in the spring
> configuration of the block but I will look for it. If you can send a
> small example it would be great.

Jean, you probably have misunderstood what I meant. I didn't mean you need to set static variables
as it's quite insane to try to _change_ value of _static_ variable, don't you think? ;-)

You should look at the configure() method of MultipartConfigurationHelper class. There configuration
is obtained from properties in a way like this:
        value = settings.getProperty(KEY_UPLOADS_MAXSIZE);
        if (value != null) {
            setMaxUploadSize(Integer.valueOf(value).intValue());
        }

Where KEY_UPLOADS_MAXSIZE is defined at the top of the class:

    String KEY_UPLOADS_MAXSIZE = "org.apache.cocoon.uploads.maxsize";

So you just need to set this property. You can do this multiple ways[1]. I suggest creating
a
uploadsettings.properties file in src/main/resources/META-INF/cocoon/properties directory
of your block.

[1] http://cocoon.apache.org/subprojects/configuration/1.0/spring-configurator/1.0/1310_1_1.html

-- 
Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon
http://reflectingonthevicissitudes.wordpress.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message