Idea+tomcat9 console garbled and js file parsing garbled
-
Garbled characters on the idea editing page --------
solution: modify the idea configuration File-->Settings--> Editor -- >File Encodings
-
When the project is running, Chinese garbled characters appear in the parsing of the js file (this situation is that the idea editing page is normal, and the parsing appears garbled after running with tomcat): as shown in the figure ------
Solution: Add in VM options: -Dfile.encoding= utf-8
-
Idea console garbled problem -----
This kind of garbled is a tomcat problem. Modify the logging.properties file in the tomcat conf directory and set the following items to UTF-8.
Then modify the idea configuration: Help–>Edit Custom VM Options–>Add in the last line of the opened file: -Dfile.encoding=utf-8
-
Finally, if it still doesn’t work, you can try to comment or delete these lines in the logging.properties file in the tomcat conf directory.
This pit is my first time using idea+tomcat9. If the above methods are not working, please check the specific reason and modify it. Related configuration