Struts2中struts.multipart.maxSize设置

java在上传文件的时候,发现控制台报错,而且提示说文件超过2M,报错信息:

the request was rejected because its size (16272982) exceeds the configured maximum (9000000)

只需如下设置Struts配置文件一下即可:

<constant name="struts.multipart.maxSize" value="9000000"/>

正在加载评论...