Java 如何在 Eclipse 4.4 (Luna) 中添加 apache-tomcat 7

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/25250835/
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-10 23:59:37  来源:igfitidea点击:

How to add apache-tomcat 7 in Eclipse 4.4 (Luna)

javaeclipse-luna

提问by user3930824

I have just installed Eclipse 4.4 (Luna) on Ubuntu, but I couldn't set the Apache Tomcat 7 server in Target Runtime environment. This option is not shown there.

我刚刚在 Ubuntu 上安装了 Eclipse 4.4 (Luna),但是我无法在 Target Runtime 环境中设置 Apache Tomcat 7 服务器。此处未显示此选项。

I also tried to add it by menu Window→ *Preferences → Server → Run time environment. But it also does not work. In it, Download additional server adapter does also not show Apache tomcat server. While apache-tomcat Server properly starts on my System at port 8080.

我还尝试通过菜单Window→ *Preferences → Server → Run time environment添加它。但它也不起作用。其中,Download additional server adapter 也没有显示Apache tomcat server。虽然 apache-tomcat 服务器在我的系统上的 8080 端口正确启动。

回答by user3930824

Create a runtime environment for Tomcat 7, but when you asked for tomcat_home or catalina_home use the path you want. I should run fine. I've made myself on MyEclipse and Tomcat 8. This is very fun because Tomcat 8 is unknown to the MyEclipse is too old. Your Luna is too young and should have a server runtime environment for Tomcat 8. Sure you can use a pro version of eclipse to make it working.

为 Tomcat 7 创建运行时环境,但是当您要求 tomcat_home 或 catalina_home 时,请使用您想要的路径。我应该跑得很好。我已经在 MyEclipse 和 Tomcat 8 上做了自己。这很有趣,因为 Tomcat 8 对 MyEclipse 来说太旧了。你的 Luna 太年轻,应该有一个适用于 Tomcat 8 的服务器运行时环境。当然你可以使用专业版的 eclipse 来让它工作。

回答by archetype

Have you installed the **Eclipse IDE for Java EE Developer Luna?**Have you installed or unzip the Tomcat 7 to your local folder? If all answer is yes, you need to add it in Server Environment to your Eclipse:

您是否安装了**Eclipse IDE for Java EE Developer Luna?**Tomcat 7 是否已安装或解压缩到本地文件夹?如果所有答案都是肯定的,您需要将它添加到服务器环境中到您的 Eclipse:

Step1:
    Click Window menu - Preferences - Server - Runtime Environments 
Step 2:
    Click Add - expand Apache - Select Apache Tomcat 7
Step 3:
    Browse the Tomcat Installation folder or you can just click   
    the Download and Install
Step 4:
    Click Finished
Step1:
    Click Window menu - Preferences - Server - Runtime Environments 
Step 2:
    Click Add - expand Apache - Select Apache Tomcat 7
Step 3:
    Browse the Tomcat Installation folder or you can just click   
    the Download and Install
Step 4:
    Click Finished

Next is add the Server to Server View

接下来是将服务器添加到服务器视图

Step 1:
    Click Window menu - View - Servers
Step 2:
    If you see "No servers available" Click the link to create a new instance
Step 3:
    Select "Tomcat v7.0 Server" from Server Type
Step 4:
    Select "Apache Tomcat v7.0" from the drop down "Server runtime environment"
Step 1:
    Click Window menu - View - Servers
Step 2:
    If you see "No servers available" Click the link to create a new instance
Step 3:
    Select "Tomcat v7.0 Server" from Server Type
Step 4:
    Select "Apache Tomcat v7.0" from the drop down "Server runtime environment"

回答by Gio

  1. go to Help/Install new Software
  2. choose "All Available sites"
  3. and search for "server"
  4. You will see "Web, Xml, Java EE and OSGi Enterprise Development" Install this Software.
  1. 转到帮助/安装新软件
  2. 选择“所有可用站点
  3. 并搜索“服务器
  4. 您将看到“ Web、Xml、Java EE 和 OSGi 企业开发”安装此软件。

After a restart of Eclipse go to

Eclipse 重新启动后转到

Window/Preferences/Server/Runtime Enviromentsand click "add"

Window/Preferences/Server/Runtime Enviroments并单击“添加

Now you will see the options for Tomcat (in my case Version 3.2 up to 8.0)

现在您将看到 Tomcat 的选项(在我的情况下为 3.2 至 8.0)

回答by Mohammad Awwaad

  1. Go to Help/Install new Software
  2. Choose "Luna - http://download.eclipse.org/releases/luna"
  3. Check "JST Server Adapters" and "JST Server Adapters Extensions"
  4. Once installed, go to "Window > Preferences > Server > Runtime Environments" and you'll find Apache Tomcat servers
  1. 转到帮助/安装新软件
  2. 选择“Luna - http://download.eclipse.org/releases/luna
  3. 检查“ JST 服务器适配器”和“ JST 服务器适配器扩展
  4. 安装后,转到“ Window > Preferences > Server > Runtime Environments”,您将找到 Apache Tomcat 服务器

回答by Prashanth Sams

  • Open Eclipse Luna
  • Choose eclipse Help > Eclipse Marketplace
  • 打开Eclipse Luna
  • 选择日食 Help > Eclipse Marketplace

enter image description here

在此处输入图片说明

  • Install Eclipse JST Server Adapters
  • 安装 Eclipse JST 服务器适配器

JST Server Adapter

JST Server Adapter Extensions

JST 服务器适配器

JST 服务器适配器扩展

  • Choose Window > Preferences > Server > Runtime Environment
  • 选择 Window > Preferences > Server > Runtime Environment

enter image description here

在此处输入图片说明

  • Click on Addbutton and select Apache Tomcat v7.0
  • 单击Add按钮并选择Apache Tomcat v7.0

enter image description here

在此处输入图片说明

  • Choose the Tomcat server directory and click Finish
  • 选择Tomcat服务器目录,点击 Finish

回答by user10865933

One of the Compatible Tomcat version for eclipse Luna is Eclipse Tomcat Plugin 9.0.1. You can download it from sourceforge.net

Eclipse Luna 的兼容 Tomcat 版本之一是 Eclipse Tomcat Plugin 9.0.1。你可以从sourceforge.net下载

Download and extract the zipped folder into ..\eclipse\dropins\ folderand restart the eclipse.

下载压缩文件夹并将其解压缩到..\eclipse\dropins\ folder并重新启动 eclipse。