Not only once I got this error when I need to change the Servlet version "Cannot change version of project facet Dynamic Web Module to 3.1"

Step 1 - find workspace location (optional)

If you don"t know where is your workspace located follow these steps:right click on the project;Click on ResourceGo to your Location
My case: D:RepositoriesBitbucketcarolannpeacock.comJerseyHelloWorld

Step 3 - Edit org.eclipse.wst.common.project.facet.core.xml file

Edit .settingsorg.eclipse.wst.common.project.facet.core.xml and change the jst.web property to 3.1.

Step 4 - Refresh and Clean

Right-click on the project and refresh followed by Project -> Cskinny ... to recompile the project.

Step 5 - Check the project facets

Going back to project properties now it should be 3.1.
These steps will work for any dynamic web module version.