I am late by 10 years, but just putting the answer here in case someone comes across this question in the first place:
The answer is documented by @Vifier Lockla in https://stackoverflow.com/a/48241373/4233030 for the question View endpoint in glassfish is not visible when webservices project created using intellij.
Essentially, maven-webapp-archetype
uses an older version of web.xml
. So, you have just to replace the older content by a more recent one.
Quoting the updated web.xml
provided in the answer above:
<?xml version="1.0" encoding="UTF-8"?> <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1"> <display-name>Archetype Created Web Application</display-name> </web-app>