简体   繁体   中英

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

一种解决方案是使用xml API读取您的配置文件并获取您要查找的值。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM