What is the point of this part of an autogenerated jsp-page in intellij?
"<%@ page contentType="text/html;charset=UTF-8" language="java" %>"
Because I don't see any loss of functionality if I remove this line. What's it's purpose?
CodePudding user response:
A jsp page should have the contentType set to text/html but the webserver may default files to text/html. Same with the charset.
CodePudding user response:
The UTF-8 in the middle is to set the encoding format, otherwise there will be garbled code when the browser opens the page, such as garbled code displayed in Chinese