MyEclipse web项目导入Eclipse,详细说明
2017-03-21 14:34
363 查看
最近导入一个MyEclipse的项目,具体是:spring4.1的web项目,同时遇到了一些问题,总结一下。
1、进入项目目录,找到.project文件,打开。
增加一个<buildCommand>(如果有的话,就不用添加)
[java] view
plain copy
<buildCommand>
<span style="white-space:pre"> </span><name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
2、找到<natures>…</natures>代码段。加入如下标签内容并保存:
[java] view
plain copy
<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>
</natures>
4、项目目录下的.classpath文件,把所有WebRoot字符串改为WebContent,保存。
5、项目目录下的.setting文件夹下的:org.eclipse.wst.common.component文件,把所有WebRoot字符串改为WebContent,保存
6、把目录下WebRoot的文件夹改名为WebContent。
7、在eclipse中Java Resources:src目录的Libraries里添加web服务器需要的包,选择BiuldPath—–>configure
Build Path——>当前窗面下选择选择Add Library—–>server Runtime——>选择需要的web服务器
8、在eclipse的项目上点右键,刷新项目。
9、在项目上点右键,进入属性(properties),在左侧列表项目中点击选择“Project Facets”,在右侧选择“Dynamic Web Module”和”Java”,点击保存即可。
如果项目正常编译没有报错,下次就不用看了。
我遇到这样一个问题,在网上查了半天也没查到什么解决版本,最后自己琢磨了下,
由于MyEclipse里的用到了jstl,导入到Eclipse里也带过来了,怎么把jst.web.jstl和me.spring去掉呢?
1、修改项目.setting文件夹下的org.eclipse.wst.common.project.facet.core.xml文件,把
[java] view
plain copy
<installed facet="jst.web.jstl" version="1.2.1"/>
<installed facet="me.spring" version="4.1"/>
这两行删除。
2、修改.classpath文件,去掉
[java] view
plain copy
<attribute name="owner.project.facets" value="jst.web.jstl"/>
PS:
a> 如果不修改第二步,那么你在修改Project facts时,可能会报以下错误:
Failed while changing version of Java to 1.8. Project facet jst.web.jstl has not been defined.
b>如果不修改上面的第五部“5、项目目录下的.setting文件夹下的:org.eclipse.wst.common.component文件,把所有WebRoot字符串改为WebContent,保存”,可能会报以下错误:
Eclipse java build path中Web App Libraries无法自动找到WEB-INF的lib目录
1、进入项目目录,找到.project文件,打开。
增加一个<buildCommand>(如果有的话,就不用添加)
[java] view
plain copy
<buildCommand>
<span style="white-space:pre"> </span><name>org.eclipse.wst.validation.validationbuilder</name>
<arguments>
</arguments>
</buildCommand>
2、找到<natures>…</natures>代码段。加入如下标签内容并保存:
[java] view
plain copy
<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>
</natures>
4、项目目录下的.classpath文件,把所有WebRoot字符串改为WebContent,保存。
5、项目目录下的.setting文件夹下的:org.eclipse.wst.common.component文件,把所有WebRoot字符串改为WebContent,保存
6、把目录下WebRoot的文件夹改名为WebContent。
7、在eclipse中Java Resources:src目录的Libraries里添加web服务器需要的包,选择BiuldPath—–>configure
Build Path——>当前窗面下选择选择Add Library—–>server Runtime——>选择需要的web服务器
8、在eclipse的项目上点右键,刷新项目。
9、在项目上点右键,进入属性(properties),在左侧列表项目中点击选择“Project Facets”,在右侧选择“Dynamic Web Module”和”Java”,点击保存即可。
如果项目正常编译没有报错,下次就不用看了。
我遇到这样一个问题,在网上查了半天也没查到什么解决版本,最后自己琢磨了下,
由于MyEclipse里的用到了jstl,导入到Eclipse里也带过来了,怎么把jst.web.jstl和me.spring去掉呢?
1、修改项目.setting文件夹下的org.eclipse.wst.common.project.facet.core.xml文件,把
[java] view
plain copy
<installed facet="jst.web.jstl" version="1.2.1"/>
<installed facet="me.spring" version="4.1"/>
这两行删除。
2、修改.classpath文件,去掉
[java] view
plain copy
<attribute name="owner.project.facets" value="jst.web.jstl"/>
PS:
a> 如果不修改第二步,那么你在修改Project facts时,可能会报以下错误:
Failed while changing version of Java to 1.8. Project facet jst.web.jstl has not been defined.
b>如果不修改上面的第五部“5、项目目录下的.setting文件夹下的:org.eclipse.wst.common.component文件,把所有WebRoot字符串改为WebContent,保存”,可能会报以下错误:
Eclipse java build path中Web App Libraries无法自动找到WEB-INF的lib目录
相关文章推荐
- MyEclipse web项目导入Eclipse,详细说明
- MyEclipse web项目导入Eclipse,详细说明
- MyEclipse web项目导入Eclipse,详细说明
- MyEclipse web项目导入Eclipse,详细说明
- eclipse 导入myeclipse web项目
- Topless eclipse导入myeclipse的web项目没法识别问题解决
- 从myeclipse导入eclipse导致不能识别为web项目(java项目转为web项目)
- 转:eclipse导入myeclipse的web项目没法识别问题解决
- 将myeclipse里的web项目导入到eclipse中并加入到Server,解决Tomcat6不支持JDK6
- eclipse导入myeclipse的web项目没法识别问题解决
- Eclipse中导入MyEclipse 的Web项目,没有标示Web标识
- eclipse导入myeclipse的web项目没法识别问题解决
- eclipse 导入myeclipse web项目【转载】
- 如何将MyEclipse中的web项目导入eclipse
- Myeclipse 向 Eclipse 中导入web项目报错,不识别
- 从myeclipse导入eclipse,不能识别为web项目(java项目转为web项目)
- myeclipse 项目导入至eclipse中不能识别为web项目,没有run on server菜单,也不能部署。
- eclipse导入myeclipse的web项目没法识别问题解决
- eclipse导入myeclipse的web项目没法识别问题解决
- eclipse导入myeclipse的web项目没法识别问题解决方法