m2o
m2o

Reputation: 6684

struts2 fileupload maximum file size

I'm using the fileUpload interceptor to upload files :). I've set a maximum file size as a interceptor parameter:

<interceptor-ref name="defaultStack">
    <param name="fileUpload.maximumSize">20000</param>
</interceptor-ref>

Now, I want to get this value in my input/form jsp. To have a message for example "upload the config file (max. size 20kb)". How do I get this value? I can see that there is an instance variable FileUpload.maximumSize, but then how do I get instances of inteceptors in the stack?

tnx

Upvotes: 2

Views: 4027

Answers (2)

svachon
svachon

Reputation: 7716

A solution would be to read your configuration file using the xml apis and get the value you are looking for.

Upvotes: 1

Related Questions