war exploded: Error during artifact deployment. See server log for details when start Tomcat in IDEA

created at 08-11-2021 views: 156

error message

Artifact task02_demo01:war exploded: Error during artifact deployment. See server log for details when start Tomcat in IDEA

After reading a large number of videos on the Internet, it was useless at all. 

reason and solution

Finally, after careful investigation, I found that there was a problem with the mapping part of my configuration file: web.xml.

A slash / is missing from the address (url-pattern) used by the browser. It should be written as follows

<servlet-mapping>
        <servlet-name>RegisterServlet</servlet-name>
        <url-pattern>/register</url-pattern>
</servlet-mapping>
created at:08-11-2021
edited at: 08-11-2021: