Using JavaBean for File Upload (3) attributes

Source: Internet
Author: User

 


Attribute
The five fields of the FileUploadBean class are private. They are:
Private String savePath
This field specifies the path to the server after the file is uploaded. Set the savePath value using the setSavePath method. This value should be set before the doUpload method is called. If no value is set, the uploaded files will be saved to the default directory of the server.
Private String filepath
This field specifies the full path of the uploaded file on the client. The value of filepath is set by the doUpload method. You can call the getFilepath method on the JSP page or Servlet to obtain the value of the filepath field. For non-Windows browsers, this value is equal to filename.
Private String filename
This field is the name of the uploaded file. The value of filename is set by the setFilename method. Call the getFilename method in JSP or Servlet to obtain the value of the filename field.
Private String contentType
This field is the content type of the uploaded file. The value of contentType is set by the doUpload method. You can use the getContentType method to obtain the value of the contentType field.
Private Dictionary fields
The fields field stores the name/value pair of the data you enter in the form. Call the getFieldValue method to obtain the value of the input element of the form.

 

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.