Article directory
Solve various garbled problems of Tomcat in IDEA
1. Set the encoding format in IDEA
2.conf directory, open server.xml and modify it to UTF-8
3.conf directory, open logging.properties, and change it to GBK to solve the problem of garbled console printing.
4.JSP garbled code
- If the JSP file is garbled, add it to the first line
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
- If the HTML file is garbled, add it to the head tag.
<meta charset="UTF-8">