Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Tomcat cannot access Chinese paths or Chinese files under linux

2025-03-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/03 Report--

Problem description: under the linux environment, tomcat publishes pages and files containing Chinese names, browser access report 404, there is no problem with non-Chinese pages; I designed a prototype for RP to publish, which contains a large number of Chinese files and paths

Step 1: set tomcat, configure the server.xml file under the conf folder, and add URIEncoding= "UTF-8" as follows

Test, if it is not yet accessible, proceed to the next step

Step 2: check the operating system language setting. Enter locale at the terminal, and the system code will be displayed. In most cases, it will not be shown as follows (as shown below is normal)

Set the operating system language to UTF-8, enter LANG=en_US.UTF-8 at the terminal, and then enter locale to view the language settings. If it is the effect of the above picture, test it again. If successful, it should be permanently set to UTF-8

Set the method to modify LANG= "UTF-8" in the file / etc/sysconfig/i18n

-Shi Longgang

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 205

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report