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.
Doget access:
The code of the servlet is as follows
The Jsp page or html page code is as follows:
After the browser sends it, the content is as follows:
Note: In the past, there was an optimization function in the browser that it will cache the links you have visited. When you visit again, the browser will not request it again. It will directly read the local cache and cause your SMS to not be sent. The solution is to write a time parameter after this link
Dopost submission
The servlet code is still the same as before, just change the doget method to dopost jsp code as follows, the effect of running in the browser is the same as the above picture
File Upload:
Multiple file upload:
If you want to do a good job, hide the progress bar and wait for it to be displayed when he uploads the file. Determine whether the MD5 of the file exists in the java code!