Tomcat的Document base ……does not exist or is not a readable directory错误

不小心移动了一下project目录,导致启动tomcat的时候会报Document base ……does not exist or is not a readable directory

大概搜索了一下,得出了些结论

1. 如果报错的目录中包含  "..metadata\.plugins\org.eclipse.wst.server.core\tmp0\..."目录
原因是 tmp0\conf\server.xml 中<Context>节点配置了很多已经移除的项目; 
删除无用的 tmp0\conf\server.xml 中的  <Context>  节点; 

删除 tmp0\work\Catalina\localhost 下的所有文件夹; 


2.如果找不到上述目录,或者报错的目录中含有tomcat目录,如下图

则是在Tomcat未部署项目的情况下,Configure the Web Modules on this server中已经存在Lo'ttery项目
只需要将该项目移除即可,即下图中WebModules中的残留项目.

移除之后别忘了保存,关闭窗口的时候会提示保存.

猜你喜欢

转载自blog.csdn.net/weixin_42072135/article/details/80529537