tomcat启动成功

 

出现报错

JavaWeb【404,The origin server did not find a current representation for the target resource······

打开apache的webapps目录一看,果然没有spring-mvc这个文件夹

JavaWeb【404,The origin server did not find a current representation for the target resource······

JavaWeb【404,The origin server did not find a current representation for the target resource······

查找后发现Web应用被部署到这个目录下来了,这是个临时存放目录,我们在运行时Tomcat还是会读取这个目录下的工程文件进行部署。
解决办法

JavaWeb【404,The origin server did not find a current representation for the target resource······
Server Location默认选择的是第一项,即使用工程根目录的相关子目录作为部署路径。而我们要想部署到Tomcat下,只需选择第二项,保存重启就可以了。
默认是选择 Use workspace metadata(dose not modify Tomcat installation)
然后修改为 Use Tomcat installation(takes control of Tomcat installation)
配置中的Server Path 和 Deploypath ,是你安装Tomcta 的包里面的文件夹
有些时候打开,发现是灰色的不能修改,那是因为Server中有部署项目,把项目都移除,然后再启动就可以操作了。


右键Add and Remove, 在弹窗里选择项目,然后Remove ALL


右键Clean 然后就能选择第二项了


选择第二项后我们发现服务器路径发生了变化,这时的服务器路径就是你tomcat的路径,
然后把部署路径(Deploy path)修改为你Tomcat下的webapps目录
ctrl+s下,然后再次启动Web应用,完成。

相关文章:

  • 2021-07-23
  • 2021-11-27
  • 2021-09-15
  • 2021-11-18
  • 2021-04-30
  • 2021-11-12
  • 2021-09-15
  • 2021-06-28
猜你喜欢
  • 2021-09-26
  • 2021-04-21
  • 2021-11-28
  • 2021-09-30
  • 2021-08-07
相关资源
相似解决方案