eclipse 没有可以从服务器添加或删除的资源
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/24624782/
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
There are No resources that can be added or removed from the server
提问by Thiru
I have created a Dynamic web project, but I am not able to deploy it into Apache Tomcat Server 6.0. I am getting this error when I try to deploy my project:
我创建了一个动态 Web 项目,但无法将其部署到 Apache Tomcat Server 6.0 中。当我尝试部署我的项目时出现此错误:
There are No resources that can be added or removed from the server.
没有可以从服务器添加或删除的资源。
回答by Krishna Kumar Chourasiya
For this you need to update your Project Facets setting.
为此,您需要更新您的 Project Facets 设置。
Project (right click) -> Properties -> Project Facets from left navigation.
项目(右键单击)-> 属性-> 左侧导航中的项目构面。
If it is not open...click on the link, Check the Dynamic Web Module Check Box and select the respective version (Probably 2.4). Click on Apply Button and then Click on OK.
如果它没有打开...单击链接,选中动态 Web 模块复选框并选择相应的版本(可能是 2.4)。单击应用按钮,然后单击确定。
回答by Ziya
Check whether your Java version is compatible with the project. Right click the project>>Properties>>Project Facets>>Java check the version is compatible with your project.
检查您的 Java 版本是否与项目兼容。右键单击项目>>属性>>项目构面>>Java 检查版本是否与您的项目兼容。
回答by sarabdeep singh
if your project maven based, you can also try updating your project maven config by selecting project. Right click project> Maven>Update Project option. it will update your project config.
如果您的项目基于 maven,您还可以尝试通过选择 project.maven 来更新您的项目 maven 配置。右键单击项目> Maven>更新项目选项。它将更新您的项目配置。
回答by Dexter
The issue is incompatible web application version with the targeted server. So project facets needs to be changed. In most of the cases the "Dynamic Web Module" property. This should be the value of the servlet-api version supported by the server.
问题是与目标服务器的 Web 应用程序版本不兼容。所以项目方面需要改变。在大多数情况下,“动态 Web 模块”属性。这应该是服务器支持的 servlet-api 版本的值。
In my case,
就我而言,
I tried changing the web_app value in web.xml. It did not worked.
我尝试更改 web.xml 中的 web_app 值。它没有用。
I tried changing the project facet by right clicking on project properties(as mentioned above), did not work.
我尝试通过右键单击项目属性(如上所述)来更改项目方面,但没有奏效。
What worked is:Changing "version" value as in jst.web to right versionfrom
什么工作是:改变 “版本”值作为jst.web到正确的版本从
org.eclipse.wst.common.project.facet.core.xml file. This file is present in the .setting folder under your project root directory.
org.eclipse.wst.common.project.facet.core.xml 文件。此文件位于项目根目录下的.setting 文件夹中。
You may also look at this
你也可以看看这个
回答by Pabita Allada
I didn't find the Dynamic Web Module option when I clicked on the link, then I have installed Maven(Java EE) Integration for Eclipse WTP from the Eclipse Marketplace.Then, the above steps worked.
单击链接时我没有找到 Dynamic Web Module 选项,然后我从 Eclipse Marketplace 为 Eclipse WTP 安装了 Maven(Java EE) Integration。然后,上述步骤起作用了。
回答by sofs1
I used mvn eclipse:eclipse -Dwtpversion=2.0 in command line in the folder where I had my pom.xml. Then I refreshed the project in eclipse IDE. After that I was able to add my project.
我在 pom.xml 所在文件夹的命令行中使用了 mvn eclipse:eclipse -Dwtpversion=2.0。然后我在eclipse IDE中刷新了项目。之后我就可以添加我的项目了。
回答by vallismortis
回答by felipewind
回答by Oberst
The only thing that worked for me was creating a
唯一对我有用的是创建一个
.java-version
.java 版本
file with "oracle64-1.8.0.112" as the only entry ( use something that is 1.6+ )
以“oracle64-1.8.0.112”作为唯一条目的文件(使用 1.6+ 的内容)
Make sure you have dynamic web module facet turned on.
确保您已打开动态 Web 模块方面。