简体   繁体   English

从tomcat webapp的eclipse导入项目

[英]eclipse import project from tomcat webapp

i have a project in tomcat,and use startup to set up it. 我在tomcat中有一个项目,并使用startup进行设置。

在此处输入图片说明

i want to import it into eclipse in order to debug it,and then i try to import project like this: 我想将其导入eclipse以便对其进行调试,然后我尝试导入如下项目:

在此处输入图片说明

it displays no project found, maybe it does not have .project file 它显示未找到任何项目,可能没有.project文件

how could i import it correctly and conviently? 如何正确正确地导入它? there are only class in web-inf,so how could copy it? web-inf中只有类,那么如何复制它呢?

Do the following: 请执行下列操作:

  1. Create new Dymanic Web Project in Eclipse 在Eclipse中创建新的Dymanic Web项目
  2. Right click -> Import -> General -> File system, on this project. 在该项目上,右键单击->导入->常规->文件系统。
  3. Choose source directory. 选择源目录。

And check Java Build Path in your project to be sure your Libraries correctly loaded. 并检查项目中的Java Build Path,以确保正确加载了库。

There is no direct way to do this, however... Perhaps, the simplest way to do this is the following: 但是,没有直接的方法可以执行此操作……也许,最简单的方法如下:

  • Download Eclipse Java EE 下载Eclipse Java EE
  • Create a Dynamic Web project 创建一个动态Web项目
  • Copy the contents of your webapp (or war) to the WebContent folder 将您的webapp(或war)的内容复制到WebContent文件夹

If the project contains Java sources andyou have access to them add them (including the package structure) to the src folder. 如果项目包含Java源代码,并且您有权访问它们,则将它们(包括包结构)添加到src文件夹中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM