This is the beginning constraint of web. XML in Maven project
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5" />
When you add something after it, you will report an error:
The markup in the document following the root element must be well-formed.
Translation error: the markup in the document after the root element must be well formed
Solution:
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
id="WebApp_ID" version="2.5" >
</web-app>
Similar Posts:
- The requested resource [/servlet] in JavaWeb is not available [How to Solve]
- Java web about web.xml 3.1
- Configure Struts2 web.xml to report an error [How to Solve]
- [Solved] IDEA javaweb web.xml File Error: Invalid content was found starting with element
- Cannot change version of project facet Dynamic Web Module to 2.5.
- How to Solve Error: The content of element type “web-app” must match “(icon?display
- [Solved] Spring Error: Artifact spring:war exploded: Error during artifact deployment. See server log for details
- Maven [error] no longer supports source option 5. Please use version 7 or later
- XML(xsd):Failed to read schema document [How to Solve]
- [Solved] Java EE file upload Error: web.xml error