Eclipse“服务器位置”部分已禁用,需要更改以使用 Tomcat 安装
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1012378/
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
Eclipse "Server Locations" section disabled and need to change to use Tomcat installation
提问by Craig Angus
I have set up a dynamic web project in Eclipse with a Tomcat 5.5 installation.
我已经在 Eclipse 中设置了一个动态 Web 项目,并安装了 Tomcat 5.5。
I want to be to set the server to us the Tomcat installation instead of the workspace metadata location, but when Eclipse displays the "Overview" screen for the server the "Server Locations" section is disabled and therefore I am unable to change it.
我想将服务器设置为 Tomcat 安装而不是工作区元数据位置,但是当 Eclipse 显示服务器的“概述”屏幕时,“服务器位置”部分被禁用,因此我无法更改它。
The overview screen is displayed when you have the servers view open and you then double click on the server.
当您打开服务器视图并双击服务器时,将显示概览屏幕。
Is it possible to enable this part of the "Overview" screen or hack a config file to point at the Tomcat installation?
是否可以启用“概览”屏幕的这一部分或破解配置文件以指向 Tomcat 安装?
回答by Jean Hominal
Ok, sorry for my previous answer, I had never seen that Overview screen before.
好的,抱歉我之前的回答,我以前从未见过那个概览屏幕。
Here is how I did it:
这是我如何做到的:
- Right click on my tomcat server in "Servers" view, select "Properties…"
- In the "General" panel, click on the "Switch Location" button
- The "Location: [workspace metadata]" bit should have been replaced by something else.
- Open (or close and reopen) the Overview screen for the server.
- 在“服务器”视图中右键单击我的 tomcat 服务器,选择“属性...”
- 在“常规”面板中,单击“切换位置”按钮
- “位置:[工作区元数据]”位应该被其他东西取代。
- 打开(或关闭并重新打开)服务器的概览屏幕。
回答by Ramon Michael
Right click on the server, then Add/Remove, then remove any projects that are in the Configured panel. Then right click on the server and choose "Clean..."from the context menu. Then the Server Locationsoption will be enabled.
右键单击服务器,然后单击Add/Remove,然后删除 Configured 面板中的所有项目。然后右键单击服务器并从上下文菜单中选择“清理...”。然后将启用服务器位置选项。
回答by blue-sky
I've just had same issue, this is what worked for me :
我刚刚遇到了同样的问题,这对我有用:
Note the message 'Server must be published with no modules present to make changes' on server dialog. So after removing the projects, re-publish your server, the option to set the server location should become re-enabled.
请注意服务器对话框上的消息“服务器必须在不存在模块的情况下发布才能进行更改”。因此,在删除项目后,重新发布您的服务器,设置服务器位置的选项应重新启用。
回答by ioana
it worked for me after deleting and adding the server back.
删除并重新添加服务器后,它对我有用。
回答by Jaykishan
回答by Dminds
Starting server and publishing without any projects helped me to modify the "Server Locations".
在没有任何项目的情况下启动服务器和发布帮助我修改了“服务器位置”。
回答by Sushil
Before making any changes in Tomcat Server Location, you need to remove project(s) deployed on server.
在Tomcat Server Location 中进行任何更改之前,您需要删除部署在服务器上的项目。
To remove project: expand tomcat server in "Servers" view
right click and select remove
删除项目:在“服务器”视图中展开 tomcat 服务器
右键单击并选择删除
回答by sashikanta
Make sure that there is no project Deploy in server. If so ,please right click on server ,select add and remove ,Then remove all project. After this you can double click on server and the option will be enabled for you.
确保服务器中没有项目 Deploy。如果是这样,请右键单击服务器,选择添加和删除,然后删除所有项目。在此之后,您可以双击服务器,该选项将为您启用。
回答by Rookie_Guy
I started Eclipse as admin, and it worked.
我以管理员身份启动 Eclipse,它工作正常。
回答by Alex
If the former actions haven't had effect, backup your server configurations, remove the server and reinclude it. It was my case.
如果之前的操作没有效果,请备份您的服务器配置,删除服务器并重新包含它。这是我的情况。