简体   繁体   English

Eclipse Tomcat7服务器不支持远程主机

[英]Eclipse Tomcat7 Server Doesnt support Remote Host

My Problem is: When I try to add my Tomcat7 to Eclipse EE as a server, I get an error message that says: 我的问题是:当我尝试将我的Tomcat7作为服务器添加到Eclipse EE时,我收到一条错误消息:

"The currently selected server type does not support remote hosts" “当前选定的服务器类型不支持远程主机”

Does anyone know how to solve this problem? 有谁知道如何解决这个问题? Or how to enable remote hosts in Tomcat? 或者如何在Tomcat中启用远程主机?

The Tomcat support in Eclipse is meant for running Tomcat locally on your own machine. Eclipse中的Tomcat支持用于在您自己的计算机上本地运行Tomcat。 That's necessary because Eclipse deploys web modules to Tomcat by copying them into a folder in the Tomcat installation. 这是必要的,因为Eclipse通过将Web模块复制到Tomcat安装中的文件夹来将其部署到Tomcat。 It can't deploy things to a remote Tomcat server because it can't copy files into a folder on a different computer. 它无法将内容部署到远程Tomcat服务器,因为它无法将文件复制到另一台计算机上的文件夹中。

Typically you'd run Tomcat on your own computer for development, and then (manually) deploy your application to a remote server when you want to make it available to the rest of the world. 通常,您可以在自己的计算机上运行Tomcat进行开发,然后(手动)将应用程序部署到远程服务器,以便将其提供给世界其他地方。

As you can see in the image the " server host name " field is " localhost " which is correct parameter value. 正如您在图像中看到的那样,“ 服务器主机名 ”字段是“ localhost ”,这是正确的参数值。

Solution:- in your case it would have been showing something like " cloud " or something else. 解决方案: -在您的情况下,它会显示类似“ ”或其他东西。 please make sure that you pass correct value which is " localhost ". 请确保您传递的是“ localhost ”的正确值。

i also faced this issue .my case is "i already have created tomcat server and my tomcat server(8) is installation location is 我也遇到过这个问题。我的情况是“我已经创建了tomcat服务器而我的tomcat服务器(8)是安装位置的

"c:/xyz/apache-tomcat-8.0.28" “C:/xyz/apache-tomcat-8.0.28”

then i changed my tomcat server(8) location to another place ` 然后我将我的tomcat服务器(8)位置改为另一个地方

"c:/abc/apache-tomcat-8.0.28" “C:/abc/apache-tomcat-8.0.28”

`after that when i try to create new tomcat server 8.then it showing this error i solved by changing server runtime Environments in eclipse `之后,当我尝试创建新的tomcat服务器8.然后它显示此错误我通过更改服务器运行时环境在eclipse中解决

preferences => server => Runtime Environments preferences => server =>运行时环境 在此输入图像描述

then select your tomcat type .you can remove the server and add new server runtime Environment or edit existing one by giving correct tomcat installation path.then it won't give "The currently selected server type does not support remote hosts" error. 然后选择你的tomcat类型。你可以通过提供正确的tomcat安装路径来删除服务器并添加新的服务器运行时环境或编辑现有服务器。然后它不会给出"The currently selected server type does not support remote hosts"错误。

在此输入图像描述

将Tomcat作为服务器运行时添加到Eclipse时,请不要忘记选中“创建新的本地服务器”。

While defining new Server in eclipse 在eclipse中定义新的Server时

In server host name box use localhost instead of cloud. 在服务器主机名框中,使用localhost而不是cloud。

对我来说,我在安装后重命名了tomcat文件夹,并在STS和Tomcat 6中收到此错误消息。请参阅bobthemagicman的答案: Eclipse Juno Tomcat 6远程主机不支持

Try to delete the temp file in your workspace. 尝试删除工作区中的临时文件。 ...workspace\\ .metadata.plugins\\org.eclipse.wst.server.core\\tmp-data ... workspace \\ .metadata.plugins \\ org.eclipse.wst.server.core \\ tmp-data

then make a new server with a new server runtime environment. 然后使用新的服务器运行时环境创建一个新服务器。

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

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