Java Apache Tomcat 未显示在 Eclipse 服务器运行时环境中

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2000078/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-13 02:17:58  来源:igfitidea点击:

Apache Tomcat Not Showing in Eclipse Server Runtime Environments

javaeclipsetomcat

提问by Dumars

I have tomcat 5.5 installed, running and verifiable at http://localhost:8080/. The Tomcat menu option appears in the Eclipse menu bar and I can start and stop Tomcat from there. In Eclipse, it does not show as a Server Runtime Environment in Window - Preferences - Server - Runtime Environments, nor does it appear in the list of environments that can be added when I click the "Add" button. All I see is the J2EE Runtime Library.

我已经在http://localhost:8080/安装、运行和验证了 tomcat 5.5 。Tomcat 菜单选项出现在 Eclipse 菜单栏中,我可以从那里启动和停止 Tomcat。在 Eclipse 中,它不会在 Window - Preferences - Server - Runtime Environments 中显示为服务器运行时环境,也不会出现在我单击“添加”按钮时可以添加的环境列表中。我所看到的只是 J2EE 运行时库。

Edit:
Running on Windows XP.

编辑:
在 Windows XP 上运行。

Eclipse version is 3.5.1

Eclipse 版本是 3.5.1

回答by Bozho

  1. Window > Preferences > Server > Runtime Environments(as you said)
  2. Add
  3. Apache > Apache Tomcat 5.5
  1. Window > Preferences > Server > Runtime Environments(如你所说)
  2. Add
  3. Apache > Apache Tomcat 5.5

That has worked for the past 3 versions of Eclipse at least. If there is not such an option on your eclipse, get a fresh installation (for Java EE developers).

这至少适用于 Eclipse 的过去 3 个版本。如果您的 Eclipse 上没有这样的选项,请进行全新安装(适用于 Java EE 开发人员)。

回答by BalusC

nor does it appear in the list of environments that can be added when I click the "Add" button. All I see is the J2EE Runtime Library.

当我单击“添加”按钮时,它也不会出现在可以添加的环境列表中。我所看到的只是 J2EE 运行时库。

Go get "Eclipse for Java EEdevelopers". Note the extra "EE". This includes among others the Web Tools Platform with among others a lot of server plugins with among others the one for Apache Tomcat 5.x. It's also logically; JSP/Servlet is part of the Java EE API.

去获取“面向 Java EE开发人员的Eclipse ”。注意额外的“EE”。这其中包括 Web 工具平台以及许多服务器插件,其中包括 Apache Tomcat 5.x。这也是合乎逻辑的;JSP/Servlet 是 Java EE API 的一部分。

回答by Tommy

You may get more success if you do a "search" for the runtime env from the preferences screen instead of hitting "add" - see this demo on youtube. http://www.youtube.com/watch?v=EOkN5IPoJVs&playnext_from=TL&videos=rVnITzSU2Z8- When you hit search, you are prompted to point to the tomcat directory and then it SHOULD add it as a server runtime environment. Unfortunately for me, that is not the case (I get "no new server runtime environments were found") But you might have more success.

如果您从首选项屏幕“搜索”运行时环境而不是点击“添加”,您可能会获得更多成功 - 在 youtube 上查看此演示。http://www.youtube.com/watch?v=EOkN5IPoJVs&playnext_from=TL&videos=rVnITzSU2Z8- 当您点击搜索时,系统会提示您指向 tomcat 目录,然后它应该将其添加为服务器运行时环境。对我来说不幸的是,情况并非如此(我得到“未找到新的服务器运行时环境”)但您可能会取得更大的成功。

回答by Hoa

I had the same problem and I solved it with the following steps

我遇到了同样的问题,我通过以下步骤解决了它

  1. Help > Install New Software...
  2. Select "Eclipse Web Tools Platform Repository (http://download.eclipse.org/webtools/updates)" from the "Work with" drop-down.
  3. Select "Web Tools Platform (WTP)" and "Project Provided Components".
  1. 帮助 > 安装新软件...
  2. 从“Work with”下拉菜单中选择“Eclipse Web Tools Platform Repository (http://download.eclipse.org/webtools/updates)”。
  3. 选择“Web 工具平台 (WTP)”和“项目提供的组件”。

Complete all the installation steps and restart Eclipse. You'll see a bunch of servers when you try to add a server runtime environment.

完成所有安装步骤并重新启动 Eclipse。当您尝试添加服务器运行时环境时,您会看到一堆服务器。

回答by Andriy Drozdyuk

In my case I needed to install "JST Server Adapters". I am running Eclipse 3.6 Helios RCP Edition.

就我而言,我需要安装“JST 服务器适配器”。我正在运行 Eclipse 3.6 Helios RCP 版。

Here are the steps I followed:

以下是我遵循的步骤:

  1. Help -> Install New Software
  2. Choose "Helios - http://download.eclipse.org/releases/helios" site or kepler - http://download.ecliplse.org/releases/kepler
  3. Expand "Web, XML, and Java EE Development"
  4. Check JST Server Adapters(version 3.2.2)
  1. 帮助 -> 安装新软件
  2. 选择“Helios - http://download.eclipse.org/releases/helios”站点或开普勒 - http://download.ecliplse.org/releases/kepler
  3. 展开“Web、XML 和 Java EE 开发”
  4. 检查JST 服务器适配器(版本 3.2.2)

After that I could define new Server Runtime Environments.

之后,我可以定义新的服务器运行时环境。

EDIT: With Eclipse 3.7 Indigo Classic, Eclipse Kepler and Luna, the steps are the same (with appropriate update site) but you need both JST Server Adapters and JST Server Adapters Extentionsto get the Server Runtime Environment options.

编辑:使用 Eclipse 3.7 Indigo Classic、Eclipse Kepler 和 Luna,步骤相同(具有适当的更新站点),但您需要JST 服务器适配器和 JST 服务器适配器扩展才能获得服务器运行时环境选项。

回答by Java Main

You need to go to Help>Eclipse Marketplace. Then type server in the search box it will display Eclipse JST Server Adapters(Apache Tomcat,...) .Select that one and install it .Then go back to Window>Preferences>Server>Runtime Environnement, click add choose Apache tomcat version then add the installation directory .

您需要转到Help>Eclipse Marketplace。然后在搜索框中键入 server 它将显示Eclipse JST Server Adapters(Apache Tomcat,...) 。选择那个并安装它。然后返回Window>Preferences>Server>Runtime Environnement,单击 add 选择 Apache tomcat version 然后添加安装目录。

回答by vimal krishna

Scenario 1:You had Eclipse showing server and now after removing the particular version you want to configure at Eclipse a new local server instance. But you can not move further.

场景 1:您有 Eclipse 显示服务器,现在在删除要在 Eclipse 中配置的特定版本后,新的本地服务器实例。但你不能再进一步了。

This happens due to reason Eclipse still looks for configured version of Tomcat directory, which directory is no longer there.

发生这种情况的原因是 Eclipse 仍在寻找 Tomcat 目录的配置版本,该目录不再存在。

There is no need till LUNA to make fresh installation!

无需等到LUNA重新安装!

All we need is to REPLACE the new server run time environment into eclipse after removing old one, which is non-existent. Eclipse will

我们只需要在删除旧的服务器运行时环境后将新的服务器运行时环境 REPLACE 到 eclipse 中,这是不存在的。日食将

enter image description here

在此处输入图片说明