Eclipse irreversible Dynamic Web Module 4.0 selection; Tomcat 9 doesn't support it

后端 未结 3 980
别那么骄傲
别那么骄傲 2021-01-01 23:34

I\'m using Eclipse Oxygen.2 (4.7.2) on Windows 10 with Java 8. I have a faceted project I run inside Eclipse using Tomcat. I had been using Tomcat 8.5, but on a new system I

3条回答
  •  隐瞒了意图╮
    2021-01-01 23:55

    My solution is a response to this message:

    Dynamic Web Module 4.0 cannot be uninstalled.
    

    1 - So; if you can't uninstall Dynamic Web Module (i repeat: "Uninstall" not "change its version"), You can first edit in your project directory the file: .settings/org.eclipse.wst.common.project.facet.core.xml and manually uninstall it by removing this line:

    
    

    2 - After this, if you want to use dynamic web module 4.0, be sure that you use at least in your facets java 1.8 inside the same file .settings/org.eclipse.wst.common.project.facet.core.xml

    
    

    Or you can also change it in your "project Facets configuration" panel

    3 - If the problem persist, take a look at your pom files and verify didn't force java version to 1.7, you should have these properties

        1.8
        1.8
    

    Remember to update your project if you change your pom file: Maven > Update Projects

    4 - Finally, if you still can't use Dynamic Web Module 4.0, juste choose between deleting your WEB-INF\web.xml file which can have a configuration for another dynamic web version like this:

    
    
    ...
    

    Otherwise you can manually change the supported version:

    
    
    ...
    

    return to the Project Facets configuration panel, a try once again to choose Dynamic Web Module 4.0, it should work

    Hope this help.

提交回复
热议问题