Cannot change version of project facet Dynamic Web Module to 2.5.

When using eclipse to create Maven archetype webapp, the project of web app version 2.3 is automatically created. When modifying the dynamic web module to 2.5 through project faces, the error will be reported: cannot change version of project facet dynamic web module to 2.5

Solution steps:

1. Right click Project – > Show In -> Navigator

2. In the. Settings directory, double-click to open the org.eclipse.wst.common.project.facet.core.xml file, change the version of install facet = “JST. Web” from 2.3 to 2.5, and save it

3. Open the web.xml file and replace its contents

Automatically generated content

 "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
 "" >

  <display-name>Archetype Created Web Application</display-name>

Replace with the following

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns=""

	<display-name>Archetype Created Web Application</display-name>


4. Right click the item – > Maven -> Update Project… -> OK

So far, the project has been successfully modified to web 2.5

Verification: check the project faces, and the dynamic web module changes to 2.5

Similar Posts: