Search code examples
eclipsemavenjakarta-eem2eclipse

web.xml is missing and <failOnMissingWebXml> is set to true


Consider:

Enter image description here

When I create a simple Maven project in Eclipse I am getting this error:

web.xml is missing and <failOnMissingWebXml> is set to true

How can I fix this problem?


Solution

  • You can do it also like this:

    1. Right click on Deployment Descriptor in Project Explorer.
    2. Select Generate Deployment Descriptor Stub.

    It will generate WEB-INF folder in src/main/webapp and an web.xml in it.

    enter image description here