使用IDEA导入Eclipse Web项目,首先Eclipse Web项目必须保证有如下内容才能保证IDEA能识别为Eclipse项目:
IDEA导入Eclipse Web项目_# Intellj IDEA

下面来讲解如何导入?

1.配置项目(产生Artifacts)

1.首先在welcome选择Import Porject
IDEA导入Eclipse Web项目_# Intellj IDEA_02
2.选择Eclipse,点击next
IDEA导入Eclipse Web项目_# Intellj IDEA_03
3.使用默认选项,点击next
IDEA导入Eclipse Web项目_# Intellj IDEA_04
4.一直next,选择jdk版本:
IDEA导入Eclipse Web项目_# Intellj IDEA_05
5.配置项目,菜单栏点击如下图标:
IDEA导入Eclipse Web项目_# Intellj IDEA_06
6.配置Project
IDEA导入Eclipse Web项目_# Intellj IDEA_07
7.配置Modules下的Paths,路径如下,并点击Apply
IDEA导入Eclipse Web项目_# Intellj IDEA_08
8.添加依赖,点击Apply
IDEA导入Eclipse Web项目_# Intellj IDEA_09
9.Libaraies,点击+,然后选择java,添加项目的jar包:
IDEA导入Eclipse Web项目_# Intellj IDEA_10
10.点击Apply
IDEA导入Eclipse Web项目_# Intellj IDEA_11
11.Facets,添加Web
IDEA导入Eclipse Web项目_# Intellj IDEA_12
12.选择web.xml和WebContent,并点击Create Artifact:
IDEA导入Eclipse Web项目_# Intellj IDEA_13
13.点击完Create Artifact,会自动跳转到如下界面,这个时候会提示错误,则选择“Fix”,并选择导入lib包,最后点击OK。
IDEA导入Eclipse Web项目_# Intellj IDEA_14

2.配置tomcat

1.在菜单栏,选择Add Configuration…
IDEA导入Eclipse Web项目_# Intellj IDEA_15
2.添加Tomcat:
IDEA导入Eclipse Web项目_# Intellj IDEA_16
3.添加Artifact…
IDEA导入Eclipse Web项目_# Intellj IDEA_17
4.配置浏览器访问的路径,并点击Apply
IDEA导入Eclipse Web项目_# Intellj IDEA_18
5.按如下操作,最后点击OK。

IDEA导入Eclipse Web项目_# Intellj IDEA_19
6.启动
IDEA导入Eclipse Web项目_# Intellj IDEA_20
7.可以在控制台看到,启动成功:
IDEA导入Eclipse Web项目_# Intellj IDEA_21