Tomcat - 设置虚拟目录

虚拟目录设置:

在server.xml的host中加入

<Context path="/focus" docBase="F:\\Focus_SVN"  reloadable="true"  debug="0" />

如果虚拟目录中有中文,则需要在localhost中加入:URIEncoding="utf-8"

正确配置:

<Connector port="8090" protocol="HTTP/1.1"
               connectionTimeout="20000" 
               redirectPort="8443" URIEncoding="utf-8"/>

参考:

https://blog.csdn.net/weixin_44931584/article/details/99695214?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-3.nonecase

posted on 2020-07-15 15:32  sunylat  阅读(257)  评论(0编辑  收藏  举报