1.eclipse对maven web项目支持的不是很好,每次导入一般都需要手动转换一下,eclipse可识别的项目

即使是j2ee版本的也一样。

 

2. 在Eclipse中打开“project properties",选"Project Facets",按下图配置:

 

eclipse新导入web工程被识别为java工程的解决办法:

 

3. 点击最下面的Futher configuration...

将content directory改为src/main/webapp即可:一般web.xml在src/main/webapp下

 

4.注意修改maven的依赖到lib下

 

如果还不行,尝试 修改项目的.project文件,保存。
在<natures>...</natures>

之间添加下列三行配置

<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
<nature>org.
eclipse.wst.common.modulecore.ModuleCoreNature</nature>
<nature>org.
eclipse.jem.workbench.JavaEMFNature</nature>

需要重启Eclipse了,然后重复上面的步骤。

相关文章:

  • 2021-09-08
  • 2022-02-05
  • 2022-01-12
  • 2022-02-05
  • 2021-11-01
  • 2021-06-19
  • 2022-12-23
  • 2022-01-08
猜你喜欢
  • 2022-01-05
  • 2021-12-12
  • 2021-09-14
  • 2021-10-18
  • 2021-09-24
  • 2021-07-29
相关资源
相似解决方案