作者:真理难辩_175 | 来源:互联网 | 2023-02-06 05:31
在struts2中用common-fileupload上传文件有文件大小限制,限制为2M。这个限制可以从struts2-core-2.0.11.1.jarorgapachestrutsdefa
在struts2中用common-fileupload上传文件有文件大小限制,限制为2M。这个限制可以从
struts2-core-2.0.11.1.jar/org/apache/struts/default.properties中struts.multipart.maxSize=2097152得知,但是这个文件是不可以的更改配置的,只有写struts.properties文件或者struts.xml文件。在struts.xml中添加一个常量配置
就可以上传20M大小的文件了。