Struts2 fileUpload and glassfish upload file limit repair

Source: Internet
Author: User
Tags file upload glassfish

Struts2 upload file based on Apache FileUpload components, after importing FileUpload, small file upload is normal, but upload large files but found that there is a limit of 2M bytes, query struts2 official information to be modified struts.xml to set, Set it to 20M by pretending to adjust it.

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

The problem should have ended, but found that Glassfish also has the Max Post Size limit, so also modified, after restarting the application server, upload files are normal.

GlassFish Max Post Size modified at configurations, Network Config, Protocols, Http-listener, HTTP-M Ax Post Size


Reference information

Http://struts.apache.org/docs/file-upload.html#FileUpload-AdvancedConfiguration


Q Group Discussions: 236201801

.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.