简体   繁体   English

通过Eclipse运行Web项目时出错(已部署到tomcat)

[英]Error in running a Web project via Eclipse (deployed to tomcat)

I am trying run a Spring MVC based project via eclipse, but each time I try to access the app, getting following error: 我正在尝试通过Eclipse运行基于Spring MVC的项目,但是每次尝试访问该应用程序时,都会出现以下错误:

WARN PageNotFound:947 - No mapping found for HTTP request with URI [] in DispatcherServlet with name '' WARN PageNotFound:947-在名称为''的DispatcherServlet中找不到带有URI []的HTTP请求的映射

The strange part is, if I manually generate the WAR and copy over to the SAME tomcat installation and start the server manually, it works without any problem. 奇怪的是,如果我手动生成WAR并将其复制到SAME tomcat安装并手动启动服务器,则它可以正常工作。

I have tried to "clean", "publish" again, change the tomcat webapps directory in "Servers" configuration, but no luck. 我试图再次“清理”,“发布”,在“服务器”配置中更改tomcat webapps目录,但是没有运气。

Any suggestion/idea in this regard highly appreciated. 在这方面的任何建议/想法都受到高度赞赏。

Thanks! 谢谢!

properties -> deployment assembly -> make sure you have declared all the dependencies here to be included in the deployment war. 属性->部署程序集->确保您已声明此处所有依赖项都包含在部署战争中。

If you use maven, choose to include all maven dependencies. 如果使用Maven,请选择包括所有Maven依赖项。

And you need to add all projects you have in your workspace and used by your web project if any. 而且,您需要添加工作区中已有的所有项目,如果有,则供Web项目使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM