尝试将 Tomcat v7 添加到 Eclipse,但在“定义新服务器”窗口中找不到它
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/7894926/
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
Trying to add Tomcat v7 to eclipse, but cannot find it in "Define a New Server" window
提问by Anthony
I'm trying to create a dynamic web project in eclipse, but my version of Apache Tomcat is v7 and the list of abvailable tomcat servers when I try to define the new server are from v3.2 to v6.0, there is nothing higher.
我正在尝试在 eclipse 中创建一个动态 web 项目,但是我的 Apache Tomcat 版本是 v7,并且当我尝试定义新服务器时,可用的 tomcat 服务器列表从 v3.2 到 v6.0,没有什么比这更高的了.
I tried to click "Download additional server adapters" but could not find any updated versions of tomcat there. I have a tomcat server working on my machine, but I wanted to link it with Eclipse to make development easier.
我尝试单击“下载其他服务器适配器”,但在那里找不到任何更新版本的 tomcat。我的机器上有一个 tomcat 服务器,但我想将它与 Eclipse 链接以使开发更容易。
I've also tried going to Window -> Preferences -> Server Tab -> Installed Runtimes tab and clicking search, then selecting my tomcat installation folder. It doesn't add anything and doesn't give any error.
我还尝试转到窗口 -> 首选项 -> 服务器选项卡 -> 已安装的运行时选项卡并单击搜索,然后选择我的 tomcat 安装文件夹。它不会添加任何内容,也不会给出任何错误。
Any ideas of how to do this? I think the version difference may be the reason I can't get my eclipse projects to compile directly to the tomcat server and I can't figure out how to add it.
关于如何做到这一点的任何想法?我认为版本差异可能是我无法让我的eclipse项目直接编译到tomcat服务器的原因,我无法弄清楚如何添加它。
回答by Sinthia V
You need to be using a version of Eclipse IDE for Java EE Developers equal to or greater than 3.6 (Helios). Other builds and earlier versions do not have the adapter for Tomcat 7. Make sure you are running the latest version of the web tools as well. Also try letting eclipse search for it under server->runtime environment. It may detect it for you, if you are running a new enough version of EE.
您需要使用 Eclipse IDE for Java EE Developers 版本等于或大于 3.6 (Helios)。其他版本和更早版本没有适用于 Tomcat 7 的适配器。请确保您也运行最新版本的 Web 工具。也可以尝试让 eclipse 在 server->runtime 环境下搜索它。如果您运行的是足够新的 EE 版本,它可能会为您检测到它。
回答by andreapier
You have to use Eclipse 3.7 aka Indigo. Also, make sure you download the EE version as you'll have everything you need to build web services.
您必须使用 Eclipse 3.7 又名 Indigo。此外,请确保下载 EE 版本,因为您将拥有构建 Web 服务所需的一切。
回答by vysh
@Manjush
@Manjush
Thanks for the pointer. Editing in Windows preferences is a good thought. For me, it dint allow to add because I had given a wrong path of the server. I am using Eclipse Kepler.
谢谢指点。在 Windows 首选项中进行编辑是个好主意。对我来说,它不允许添加,因为我给出了错误的服务器路径。我正在使用 Eclipse 开普勒。
Windows->Preferences->Servers-->Runtime Environments-->Add
回答by Manjush
Go to Windows->Preferences->Servers->Installed Runtimes and add (point to) an installed Tomcat 7 installation on your system.
转至 Windows->Preferences->Servers->Installed Runtimes 并在您的系统上添加(指向)已安装的 Tomcat 7 安装。

