Artifact Example:Web exploded: Error during artifact deployment

created at 08-31-2021 views: 4

I debugged for two hours and didn't change it, but it finally changed

After running tomcat, Artifact Example: Web exploded: Error during artifact deployment is reported, and the others are garbled, so they will not be posted.

Only provide my method

In web.xml

<url-pattern>hello</url-pattern> to
<url-pattern>/hello</url-pattern>

It is caused by a slash /!!!

reason

Then I explored why I should start with a forward slash,

It seems to be mainly a mapping specification, because

<url-pattern> is the root directory of the web program, which is the mapping of the servlet, and it needs to comply with the specification

created at:08-31-2021
edited at: 08-31-2021: