Create a new maven project on idea, and run the error report after configuring tomcat.

I just started to learn spring boot, and built a new maven project on idea. After configuring Project Structure and tomcat according to the tutorials, I made an error running index.jsp Times:

Error running "index.jsp": Cannot load C:\Users\HXB\.IntelliJIdea2018.2\system\tomcat\index_jsp_test2\conf\web.xml: Error on line 488: The content of elements must consist of well-formed character data or markup.

idea version ultimate 2018.2.6 jdk version 1.8.0jdk version 9.0.131
after following the path to find the web.xml, the 486 to 489 lines of code look like this:

486    <filter-mapping>
487        <filter-name>httpHeaderSecurity</filter-name>
488        <<url-pattern>/*</url-pattern>
489    </filter-mapping>
The extra "<" in line 488 will be automatically generated after I manually delete and save it and run it again. Is there any solution to this situation? Thank you
Picture description

Dec.20,2021

Okay, I know why. I added a self-written interceptor to the web.xml in the conf folder under the tomcat installation path. The interceptor I wrote myself hit an extra "<" on this line, so when running a new project, no matter how I change the web.xml, of the project in the tomcat in the user folder of disk c, as soon as I run it, tomcat will modify it according to its own configuration file, so it keeps reporting errors. Just change this line in the configuration file of tomcat itself and run it again. It's so humiliating.

Menu