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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]