Disclaimer: The materials used in this column are written by VIP students of Kaige Academy. Students have the right to remain anonymous and have the right to final interpretation of the article. Kaige Academy aims to promote VIP students to learn from each other based on public notes.
fileUpload file upload
FileUpload is a sub-project under Apache commons, which is used to implement the file upload function in the Java environment.
1. Create a jsp page for uploading files, set the enctype attribute of the FORM form to "multipart/form-data", code example:
2. Receive the data Servlet class of the uploaded file:
Visit the jsp page:
Console prints:
Successfully uploaded images: