将现有的 Web 应用程序导入 Eclipse
我需要将现有的 Web 应用程序导入 Eclipse 中。
请参阅我的 Web 应用程序的结构,如下图所示。
http://imageshack.us/f/220/structuralk.jpg/
来自 Eclipse IDE,在使用导入时我需要选择什么选项,即我应该将
- 现有项目使用到 Eclipse
- 存档文件
- 文件系统
I need to import a existing Web Application , into Eclipse .
Please see the Structure of my Web Application as shown in the below figure .
http://imageshack.us/f/220/structurek.jpg/
From Eclipse IDE , while using import What option i need to select that is should i use
- Existing projects into Eclipse
- Archive File
- File System
please see this image
http://imageshack.us/f/850/eclipseo.jpg/
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
将现有项目导入 Eclipse
仅适用于在 Eclipse 中创建的项目。而且您在这里肯定不是在处理
存档文件
。从文件系统导入
只是复制资源,但实际上并不会为您创建 Eclipse 项目。我建议您创建一个新的
动态 Web 项目
,配置所有必需的方面,然后将现有应用程序的所有内容复制到WebContent
文件夹,将其拖放到Project Explorer
中或使用从文件系统导入
,覆盖所有内容。到目前为止,Eclipse 中似乎没有其他方法可以做到这一点。不过,您可以查看类似的帖子。用户 @RC 建议在此过程中使用 ant 任务,但我非常确定它不会为您配置所有必需的方面。它可能适用于一些简单的 Java 项目,但对于 Java EE 项目肯定不够。
Import existing projects into Eclipse
works only for projects that were created in Eclipse.And you're definitely not dealing with an
Archive File
here.Import from the File System
just copies the resources but does not actually create an Eclipse project for you.What I would advise you, is to create a new
Dynamic Web Project
, configuring all the required facets, and then just copy all the contents of your existing app to theWebContent
folder, either by drag'n'dropping it into theProject Explorer
or by usingImport from the File System
, overwriting all the contents.So far, there seems to be no other way to do it in Eclipse. However you may check out the similar post. The user @RC recommends using ant task for this process, but I'm more than sure that it won't configure all the required facets for you. It may work for some simple Java projects, but surely not enough for Java EE projects.