Old Jiang was a friend of mine who helped write a project in JAVA, because he had never been familiar with such environments before, and now JSP hosts are hard to find (virtual hosts have not been used for a long time ), so a few days ago, we set up a JAVA website environment in Linux VPS (here we install the JSP environment ). Then we moved the project into the project this evening. Everything went smoothly, but we found that the Chinese characters on the verification code were garbled.
After checking the information, we can see that there should be no fonts installed. There are various methods on the Internet, but this method is relatively simple. Because after JDK1.5, you only needJre/lib/fonts/CreateFallbackDirectory.Simsun. ttcIf the font is lost, restart the server.
1. Log on to the corresponding directory
| The code is as follows: |
Copy code |
/Usr/java/jdk1.7.0 _ 80/jre/lib/fonts/
|
Here, Chiang is the JDK1.7 version installed, so we can find it.
2. Create the fallback Directory
You can use mkdir to create one, or you can use FTP to manually create one.
Third, UploadSimsun. ttcFont
| The code is as follows: |
Copy code |
Http://soft.itbulu.com/fonts/simsun.zip
|
We can download the font and decompress itSimsun. ttcUploadFallbackDirectory.
Finally, restart tomcat
You can restart tomcat or reboot the server. This takes effect.