1. After you created your maven project, you should convert it to dynamic web project:
right click your project and click preference and then go to project facets configuration page to select the Dynamic Web Module(version2.5, 3.0 only tomcat7+ support):
2. After step1, your project will auto generate one WebContent folder, you just delete it.
3. Right click your project and click preference then go to Deployment Assembly:
select the /WebContent and then click remove to remove
4. Click Add button, then select folder to click next button:
5. add you src/main/resources and src/main/webapp
6. add the maven jar dependancy :
7. Finally the configuration will show like below:
8. Then you can deploy your project to the tomcat.

本文将指导您如何使用Maven创建并配置动态Web项目,然后将其部署到Tomcat服务器。包括从创建项目开始,到配置动态Web模块,删除默认WebContent文件夹,添加资源和依赖,最终完成部署的全过程。
486

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



