开发配置:
- Tomcat 8.5
- MyEclipse2017
1.问题描述:使用MyEclipse将项目部署到Tomcat下时,默认部署到ROOT
控制台出现警告:
警告 [localhost-startStop-1] org.apache.catalina.core.StandardContext.setPath A context path must either be an empty string or start with a ‘/’ and do not end with a ‘/’. The path [/] does not meet these criteria and has been changed to []
2.原因:context.xml中的context设置成了”/”:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/">
</Context>
改为:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myapp">
</Context>
OK!
本文介绍如何解决使用MyEclipse部署项目到Tomcat时默认部署到ROOT的问题,并给出具体的修改context.xml文件的方法。
525

被折叠的 条评论
为什么被折叠?



