eclipse常见问题 梦里梦外; 2022-05-26 10:37 475阅读 0赞 1.如何把MyEclipse中的web项目导入到Eclipse中运行 有时我们需要将MyEclipse中的项目导入到Eclipse中运行,如果不注意到一些细节,会造成无法运行的后果。下面就说说具体操作: 如何导入到Eclipse就不在重述了,导入后出现如下错误: ![Center][] 与上面Eclipse生成的web项目对比发现少了Deployment Descriptor:......这个项,因此我们要把它添加进来,如何添加?首先我们选定刚导入的项目右键打开其属性properties,选定Project Facets,点击Convert to faceted form...,进去后勾上Dynamic Web Module和java,然后ok,会发现项目下多了Deployment Descriptor:......这个项, ![Center 1][] 然后还是提示错误,打开错误提示:The superclass "javax.servlet.http.HttpServlet" was not found on the Java Build Path,原因是导入的项目还未部署到我们的Tomcat上,仍然右击项目属性properties,选择Java Bulid Path,选择Libraries,点击右边的Add Library..进去后选择Server Runtime,然后点击next,选中你eclipse上的Tomcat服务器,然后finish. ![Center 2][] 然后点击Apply,发现先前的错误提示消失了, ![Center 3][] 到这里我们还是不能运行该项目,原因是在Eclipse中Webapp是存放在WebContent里面,我们只需把WebRoot里面的文件全部拷贝一份到WebContent下面,这样我们就可以在Eclipse中运行导入的MyEllipse项目了。。 转自:https://blog.csdn.net/dancheren/article/details/52517184 2. # [报错修改:Tomcat version 7.0 only supports J2EE 1.2, 1.3, 1.4, and Java EE 5 and 6 Web][Tomcat version 7.0 only supports J2EE 1.2_ 1.3_ 1.4_ and Java EE 5 and 6 Web] # 在eclipse的workspace里面找到该项目。 依次进入:.settings->org.eclipse.wst.common.project.facet.core.xml。 打开文件后,将下面的版本改低一点 <installed facet="jst.web" version="3.1"/> ![708894-20161220153854323-72750807.png][] 重启eclipse即可。 ![708894-20161220153916511-812186021.png][] [Center]: /images/20220526/4f191a4f239b4a1e904d53f7ce32f478.png [Center 1]: /images/20220526/0c23e1542c5e4591a099df1b969bc813.png [Center 2]: /images/20220526/f184ecef342e406480c46fbcd7f8f15f.png [Center 3]: /images/20220526/8930e59b695942fb8d46b5839bbde364.png [Tomcat version 7.0 only supports J2EE 1.2_ 1.3_ 1.4_ and Java EE 5 and 6 Web]: http://www.cnblogs.com/mabiao008/p/6202900.html [708894-20161220153854323-72750807.png]: /images/20220526/239314bfd0ea4687b21176f4f3fabec6.png [708894-20161220153916511-812186021.png]: /images/20220526/92b53c1577cd42d8873b52ca4c17aaf8.png
还没有评论,来说两句吧...