Reputation: 1100
I'm using Eclipse Kepler SR1 for EE. I have a web app whose project settings include Server > Tomcat v7.0 Server at localhost.
This web app's web.xml file used specify that it was a version 2.4 servlet, but I've modified it to now specify that it is a version 3.0 servlet. The web-app
element now looks like:
<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">
And... as far as I can tell, Eclipse is happy with this. There is nothing in the Problems tab and the web app runs fine. The problem I'm having is that in the Project Explorer, where it says "Deployment Descriptor: blah blah blah" the icon that appears is a small box with "2.4" inside:
[2.4] Deployment Descriptor: blah blah blah (StackOverflow won't let me post pictures, but this is pretty close).
So, is this an Eclipse bug, or is there something else I should have done to fully switch the servlet from version 2.4 to 3.0? I've closed and reopened the project and that didn't fix the problem.
Upvotes: 2
Views: 128
Reputation: 2738
You must change the version of the Java Facet project, do it: rigth click Project -> Properties -> Project Facets, and change the version to 3.0 in the Dynamic Web Module Option.
Upvotes: 1