2

With Eclipse EE 4.7.3, Java 1.8.0_161 and Apache Tomcat 9.0.6 I cannot create Dynamic Web Project 4.0, the maximum available version is 3.1:

Eclipse: create Dynamic Web project

I also can't change version to 4.0 in Project Facets, the maximum version is again 3.1:

Eclipse: project facets

How do I set Dynamic Web Module version to 4.0?

Vladimir M.
  • 1,049
  • 1
  • 10
  • 24
  • Possible duplicate of _Eclipse irreversible Dynamic Web Module 4.0 selection; Tomcat 9 doesn't support it_ . See https://stackoverflow.com/questions/48649041/eclipse-irreversible-dynamic-web-module-4-0-selection-tomcat-9-doesnt-support/48657610#48657610. The workaround is to edit your project's **core.xml** file. – skomisa Mar 27 '18 at 20:18

1 Answers1

1
  1. Right Click on your project folder.
  2. Go to Show In > Navigator
  3. Go to Navigator and expand the .settings folder
  4. Open org.eclipse.wst.common.project.facet.core.xml file

    <faceted-project>
      <fixed facet="wst.jsdt.web"/>
      <installed facet="jst.web" version="3.1"/>
      <installed facet="wst.jsdt.web" version="1.0"/>
      <installed facet="java"`enter code here` version="1.8"/>
    </faceted-project>
    
  5. Change the version like this <installed facet="jst.web" version="4.0"/>

  6. Save

  7. Just update your project. Right Click on The Project Folder > Maven > Update Project
  8. Select the Project and click 'Ok' Works like a charm.