Problem Description: after submitting the form, an error is reported, and the servlet is unavailable
Solution:
The development tool I use is idea2020. First, check whether comments are added:
2. Through consulting materials, it is said that servlets should be configured under web.xml. Here, I run JSP to get the web page source code, but I don’t know why. I haven’t configured web.xml in previous projects
3. Solution: add the following in the web app of web.xml:
<web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0">
So far, the problem has been solved.
Similar Posts:
- maven web web.xmlThe markup in the document following the root element must be well-formed.
- Java web about web.xml 3.1
- [Solved] IDEA javaweb web.xml File Error: Invalid content was found starting with element
- How to Solve Error: The content of element type “web-app” must match “(icon?display
- Configure Struts2 web.xml to report an error [How to Solve]
- Maven [error] no longer supports source option 5. Please use version 7 or later
- [Solved] Spring Error: Artifact spring:war exploded: Error during artifact deployment. See server log for details
- The prefix “mvc” for element “mvc:annotation-driven” is not bound Error
- [Solved] maven 3.5.0 combined with eclipse suggests solutions to lambda expressions are allowed only at source level 1.8 or above errors
- Cannot change version of project facet Dynamic Web Module to 2.5.