江户川乱折腾
具体步骤:1、通过eclipse的import方式,将web项目导入。2、打开.project文件,将原配置文件中的<buildSpec>...</buildSpec><natures>...</natures>部分替换为以下内容: <buildSpec><buildCommand><name>org.eclipse.wst.common.project.facet.core.builder</name><arguments></arguments></buildCommand><buildCommand><name>org.eclipse.wst.Jsdt.core.javaScriptValidator</name><arguments></arguments></buildCommand><buildCommand><name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name><arguments></arguments></buildCommand><buildCommand><name>org.eclipse.jdt.core.javabuilder</name><arguments></arguments></buildCommand><buildCommand><name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name><arguments></arguments></buildCommand><buildCommand><name>com.genuitec.eclipse.j2eedt.core.DeploymentDeScriptorValidator</name><arguments></arguments></buildCommand><buildCommand><name>org.eclipse.wst.validation.validationbuilder</name><arguments></arguments></buildCommand><buildCommand><name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name><arguments></arguments></buildCommand></buildSpec><natures><nature>org.eclipse.jem.workbench.JavaEMFNature</nature><nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature><nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature><nature>com.genuitec.eclipse.j2eedt.core.webnature</nature><nature>org.eclipse.jdt.core.javanature</nature><nature>org.eclipse.wst.Jsdt.core.JsNature</nature><nature>org.eclipse.wst.common.project.facet.core.nature</nature></natures> 3、刷新项目,项目->右键->Properties->Project Facets->Configuration->custom,选择Java和Dynamic Web Module(注意版本,如果无法确定自己的版本,请从高往低测试)4、修改.settings目录(可在navigator视图下查看)中org.eclipse.wst.common.component文件的如下内容:<wb-resource deploy-path="/" source-path="/WebContent"/>改为: <wb-resource deploy-path="/" source-path="/WebRoot"/>5、刷新项目,然后查看classpath是否有问题。6、最后,删除eclipse默认的WebContent目录,Myeclipse默认的是WebRoot。