Without using the upload component of the WebWork package, use your own upload component directly

Source: Internet
Author: User

Now still in use WEBWORK2, these days want to write their own upload code to reorganize, packaging, as a component to use, later on in the code rewrite, today want to put my upload components into the WEBWORK2, But there is a problem: the request in WEBWORK2 's action is resolved, not the most primitive httpservletrequest, I use (commons-fileupload) Servletfileupload, get the file list is always 0, looking for a long time to know is Webwork.multipart.parser make ghost, because WebWork always in dispatch automatically do multipart processing, The way to deal with Pell, COS, jakata three ways, just start to get the most original HttpServletRequest objects, can not get, are multipart handled, So just think of the webwork.multipart.parser =jakata changed to WEBWORK.MULTIPART.PARSER=ABCDEFG to see the effect, haha, sure enough, after success

And then you know the real intent of the WebWork file upload.

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.