zoukankan      html  css  js  c++  java
  • Tomcat

    错误信息:

    cvc-complex-type.2.4.a: Invalid content was found starting with element 'display-name'. One of 
     '{"http://xmlns.jcp.org/xml/ns/javaee":servlet-class, "http://xmlns.jcp.org/xml/ns/javaee":jsp-file, "http://
     xmlns.jcp.org/xml/ns/javaee":init-param, "http://xmlns.jcp.org/xml/ns/javaee":load-on-startup, "http://
     xmlns.jcp.org/xml/ns/javaee":enabled, "http://xmlns.jcp.org/xml/ns/javaee":async-supported, "http://
     xmlns.jcp.org/xml/ns/javaee":run-as, "http://xmlns.jcp.org/xml/ns/javaee":security-role-ref, "http://
     xmlns.jcp.org/xml/ns/javaee":multipart-config}' is expected.

    解决方法:

    在xml文件的“xmlns:xsi”里面加入:

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance http://java.sun.com/xml/ns/j2ee:servlet-class http://java.sun.com/xml/ns/j2ee" 

    最终xml文件头部如下:

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance http://java.sun.com/xml/ns/j2ee:servlet-class http://java.sun.com/xml/ns/j2ee" 
        xmlns="http://xmlns.jcp.org/xml/ns/javaee"
    	xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
    	id="WebApp_ID" version="4.0">

    参考:

    https://blog.csdn.net/caoxiaohong1005/article/details/53401880

  • 相关阅读:
    @atcoder
    @atcoder
    @一句话题解
    @gym
    JS-try/catch方法判断字符串是否为json格式
    JS-find、filter、forEach、map
    JS-条件语句5准则
    JS-防抖与节流
    CSS-强制换行
    Elasticsearch-基础介绍及索引原理分析(转载)
  • 原文地址:https://www.cnblogs.com/sunylat/p/12950311.html
Copyright © 2011-2022 走看看