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.
In a web project, if the content is updated in an external tool, it will not be automatically deployed to the server in eclipse. If it is modified in eclipse, it will be automatically deployed.
There are two cases for obtaining the value in the getparaameter(String) method:
1. If there is no name you wrote in the form, return null
2. If an empty string is filled in the form, return a null character
The results obtained:
We can get all the names of the request header through the Enumeration<E> elevator
Garbled code processing: 1. Set the encoding format on the page, so that the browser will convert the format for you when submitting data.
2. When receiving data on the server, you need to call the transcoding method, and then get the form data
setCharacterEncoding(String) Set the character set encoding format
If we do not set the encoding format on the page and do not use this method to call the transcoding on the server, the form we submit will appear garbled.
After setting, there will be no garbled characters
Methods in HttpServletResponse
Some method operations
Here you need to tell the browser the encoding format of the content you are responding to