JavaServer Faces 2.2 requires Dynamic Web Module 2.5 or newer
I have encountered this with Maven projects too. This is what I had to do to get around the problem:
First update your web.xml as mentioned Thorbjørn Ravn Andersen. I used version 3.0 as below:
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0">
<display-name>Servlet 3.0 Web Application</display-name>
</web-app>
Then right click on your project and select Properties -> Project Facets In there you will see the version of your Dynamic Web Module. This needs to change from version 2.3 or whatever to version 2.5 or above (I chose 3.0).
However to do this I had to uncheck the tick box for Dynamic Web Module -> Apply, then do a Maven Update on the project. Go back into the Project Facets window and it should already match your web.xml configuration - 3.0 in my case. You should be able to change it if not.
If this does not work for you then try right-clicking on the Dynamic Web Module Facet and select change version (and ensure it is not locked).
Hope that works!
The solution that i had found for this problem is
1 ) Right Click on the Project >Properties>Uncheck Dynamic Web Module>Apply And Close.
2 ) Right Click on the Project>Maven>Update Project...
Your problem is that you have marked your web.xml as being servlet 2.3 compliant (or perhaps not even that - I am not sure how your doctype in a comment is interpreted)
<?xml version="1.0" encoding="UTF-8"?>
<!-- <!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
and you need it to be at least servlet 2.5 compliant for the Eclipse tooling to work.
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
(untested - copied from http://javahowto.blogspot.dk/2009/10/sample-webxml-servlet-25.html)
You may need to recreate the Eclipse project to have the changes picked up.
I had the same problem and in my web.xml had version 2.5 while the project had the (right-click on Project-> Properties-> Progect Facets->) Dynamic Web Module 2.3. Although I tried to change the version from 2.3 to 2.5 ECLIPSE did not permit it.
Solution:
I removed the check mark under the heading Dynamic Web Module, I saved and I had Update Project. Automatically re-awakening is entering the box with the correct version.