Thiru
Thiru

Reputation: 799

There are No resources that can be added or removed from the server

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:

There are No resources that can be added or removed from the server.

Upvotes: 59

Views: 145088

Answers (12)

Eclipse allow run de dynamic project with Tomcat, if there are in project servlet files. Case there are only html files, and there aren´t java files, will not possible and Eclipse show up de message: There are No resources that can be added or removed from the server. You need create java files for run de project in Tomcat. Thanks!

Upvotes: 0

K.Andy Wang
K.Andy Wang

Reputation: 421

First check Project Facets setting as most replies had been answered.

Then check the Runtime Server is also aligned with the appropriate JRE.

In my case, I updated project JRE System Library and JDK compiler to 1.8, but original Tomcat server is setting up on JRE 1.7,after upgraded to 1.8,the issue is resolved. enter image description here

Upvotes: 0

Pragati
Pragati

Reputation: 21

The issue is it is missing Dynamic Web Module facet definition. Run the following at command line

mvn eclipse:eclipse -Dwtpversion=2.0

After build is success, refresh the project and you will be add the web project to server.

Upvotes: 2

sofs1
sofs1

Reputation: 4176

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.

Upvotes: 7

Felipe Windmoller
Felipe Windmoller

Reputation: 1743

Right click on the project, select properties and then select "Targeted Runtimes". Check if Tomcat is selected here.

Targeted Runtimes

Upvotes: 1

Krishna Kumar Chourasiya
Krishna Kumar Chourasiya

Reputation: 2136

For this you need to update your Project Facets setting.

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.

enter image description here

Upvotes: 110

Parker
Parker

Reputation: 7494

I encountered this error even though the Project Facets were set appropriately. The problem was that the "Runtime Environment" property was not set on the server:

Empty Runtime Environment for Eclipse Tomcat

It simply needed to be set to the appropriate Runtime:

Runtime Environment for Eclipse Tomcat

Upvotes: 2

Enthusiastic Techy
Enthusiastic Techy

Reputation: 908

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.

Upvotes: 7

Pabita Allada
Pabita Allada

Reputation: 49

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.

Upvotes: 4

Oberst
Oberst

Reputation: 31

The only thing that worked for me was creating a

.java-version

file with "oracle64-1.8.0.112" as the only entry ( use something that is 1.6+ )

Make sure you have dynamic web module facet turned on.

Upvotes: 1

Dexter
Dexter

Reputation: 4275

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.

In my case,

I tried changing the web_app value in web.xml. It did not worked.

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 version from

org.eclipse.wst.common.project.facet.core.xml file. This file is present in the .setting folder under your project root directory.

You may also look at this

Upvotes: 6

Ziya
Ziya

Reputation: 730

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.

Upvotes: 14

Related Questions