我在 eclipse 中看不到 run-as server 选项是怎么回事
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6629631/
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
What can't I see the run-as server option in eclipse
提问by jeph perro
I'm working on a project in Eclipse Version: 3.5.2
我正在 Eclipse 版本中开发一个项目:3.5.2
My colleague and I both checked out the same maven project from svn. I'm trying to debug it by running it in Tomcat.
我和我的同事都从 svn 签出了同一个 maven 项目。我试图通过在 Tomcat 中运行它来调试它。
He can see the run-as server option when he right-clicks the project, but I can't.
当他右键单击项目时,他可以看到作为服务器运行的选项,但我看不到。
What did I forget to do?
我忘了做什么?
I can't even see the server option under Window->Show View->Other
Thanks
我什至看不到窗口-> 显示视图-> 其他下的服务器选项,
谢谢
回答by Vineet Reynolds
Deployment of applications on Java EE Application Servers or containers is possible only when you have WTP installed. From the screenshots posted, I can infer that either WTP is unavailable or it hasn't been loaded by Eclipse (for some unfortunate reason).
只有安装了 WTP,才能在 Java EE 应用服务器或容器上部署应用程序。从发布的屏幕截图中,我可以推断出 WTP 不可用或 Eclipse 尚未加载(出于某种不幸的原因)。
You ought to perform one of the following:
您应该执行以下操作之一:
- You can get a copy of the Eclipse IDE for Java EE developers, which contains WTP by default. If you need the Galileo edition, you will need to look into the Galileo archives. Also, you should use a JDK to start Eclipse. WTP might not be available if you use a JRE.
- If you do not wish to install Eclipse with WTP from scratch, install the WTP plug-ins. Use the Galileo update site for this.
- If you are sure that you have WTP installed, but you are unable to find that Galileo has loaded the plug-ins, then you will need to inspect the contents of the
.metadata\.log
file in your workspace. This would give you a hint as to why the plug-in was not loaded. Start Eclipse with the-clean
flag, to get Eclipse to detect the plug-in if it hasn't done so previously.
- 您可以获得一份面向 Java EE 开发人员的Eclipse IDE副本,其中默认包含 WTP。如果您需要伽利略版,则需要查看伽利略档案。此外,您应该使用 JDK 来启动 Eclipse。如果您使用 JRE,WTP 可能不可用。
- 如果您不想从头开始安装带有 WTP 的 Eclipse,请安装 WTP 插件。为此,请使用 Galileo 更新站点。
- 如果您确定安装了 WTP,但找不到 Galileo 已加载插件,那么您需要检查
.metadata\.log
工作区中文件的内容。这将为您提供有关未加载插件的原因的提示。使用该-clean
标志启动 Eclipse ,让 Eclipse 检测之前没有检测过的插件。
Note: If WTP has been installed, you should be able to confirm this by view the list of loaded features, as shown below.
注意:如果已经安装了 WTP,您应该可以通过查看加载的功能列表来确认这一点,如下所示。
回答by Chris Persichetti
Here's are some instructions I wrote up when I configured my Eclipse to work with Tomcat. Hopefully it'll help you.
以下是我在将 Eclipse 配置为与 Tomcat 一起使用时编写的一些说明。希望它会帮助你。
Open Servers Window
打开服务器窗口
Open the Servers view.
If servers view is not open, select menu item Window/Show View/Other...
Select Servers under the Server section.
打开服务器视图。
如果服务器视图未打开,请选择菜单项窗口/显示视图/其他...
在服务器部分下选择服务器。
Add New Server
添加新服务器
Right Click in the Servers View select New/Server
Expand Apache and select Tomcat v5.5 Server
Click Next.
Select the directory of your Tomcat installation. (ie c:\tomcat)
Click Finish
在服务器视图中右键单击选择新建/服务器
展开Apache并选择Tomcat v5.5 Server
点击下一步。
选择 Tomcat 安装目录。(即 c:\tomcat)
单击完成
回答by sgokhales
回答by V-Q-A NGUYEN
Did you create a Web Project? If you right click on the project and go to Properties > Project Facets is Dynamic Web Module selected. This works for me.
您是否创建了 Web 项目?如果您右键单击该项目并转到“属性”>“项目方面”,则会选择动态 Web 模块。这对我有用。
回答by yuvaraj
In case of web application 3.0 in my case i have taken war file of project and deleted existing app from eclipse and replaced it with war it worked for me
在 Web 应用程序 3.0 的情况下,我已经获取了项目的 war 文件并从 eclipse 中删除了现有的应用程序并将其替换为对我有用的 war