TomCat Url忽略大小写

注:tomcat 8不生效

修改context.xml

vim /usr/local/apache-tomcat-8.5.40/conf/context.xml

1
2
3
4
5
6
7
8
9
10
11
12
<Context caseSensitive="false">

<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>

<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
</Context>

重启

1
2
systemctl status tomcat8
systemctl restart tomcat8

验证

1
2
3
# 查看监听的端口
# Tomcat默认8080端口
netstat -lnpt