修改了一下web.xml,加入了一个<filter>,然后就报这样的错???

The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet- mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-constraint*,login-config?,security-role*,env- entry*,ejb-ref*,ejb-local-ref*)".

后来在Stack Overflow上找到答案

做个搬运工,搬一下解决方法

Change the schema reference from

<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" > <web-app></web-app>

to this

<?xml version="1.0" encoding="UTF-8"?>

<web-app xmlns="http://java.sun.com/xml/ns/javaee"
version="2.5"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> // your all conent goes here </web-app>

The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-mapping*,listener*,servlet*,servlet- mapping*,session-config?,mime-map的更多相关文章

  1. web.xml配置bug之提示The content of element type "web-app" must match "(icon?,display- name?,description?,distributable?,

    错误:配置web.xml时,出现红色叉叉,提示 The content of element type "web-app" must match "(icon?,disp ...

  2. mybatis项目启动报错 The content of element type "resultMap" must match "(constructor?,id*,result*,association*,collection*,discriminator?)".

    启动项目报错 2018-02-26 17:09:51,535 ERROR [org.springframework.web.context.ContextLoader] - Context initi ...

  3. Multiple annotations found at this line: - The content of element type "mapper" must match "EMPTY". - Attribute "namespace" must be declared for element type "mapper".

    今天在mybatis的mapper映射配置文件中遇到了这样的问题,困扰了我3个小时: Multiple annotations found at this line: - The content of ...

  4. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?,objectWrapperFactory?,reflectorFactory?,plugins?,environments?,databaseIdProv

    在mybatis配置文件config.xml中报错: The content of element type "configuration" must match "(p ...

  5. The content of element type "package" must match "(result-types?,interceptors?...

    错误:“The content of element type "package" must match "(result-types?,interceptors?,de ...

  6. The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration PUBLIC & ...

  7. The content of element type "sqlMapConfig" is incomplete,

    The content of element type "sqlMapConfig" is incomplete, it must match "(properties? ...

  8. 【转】The content of element type "configuration" must match "(properties?,settings?,typeAliases?,typeHandlers?,objectFactory?...

    [转]The content of element type "configuration" must match "(properties?,settings?,typ ...

  9. The content of element type "beans" must match "(description?,(import|alias|bean)*)

    The content of element type "beans" must match "(description?,(import|alias|bean)*) - ...

随机推荐

  1. game to refactor for refactor

    first step, only aim to work. it works, but i have not seen the necessaty to use class yet. my quest ...

  2. sqlalchemy 和 django 插入操作后自动返回自增ID

    result = session.execute('insert into ***') session.commit() last_insert_id = result.lastrowid 注意:如果 ...

  3. MySQL&MyBatis 时间处理的配合

    1:Mysql 时间类型 mysql数据库:时间类型 1)datetime datetime: "yyyy-mm-dd hh:mm:ss" datetime "1000- ...

  4. Spring Boot 2 (四):使用 Docker 部署 Spring Boot

    Spring Boot 2 (四):使用 Docker 部署 Spring Boot Docker 技术发展为微服务落地提供了更加便利的环境,使用 Docker 部署 Spring Boot 其实非常 ...

  5. 把源码放到服务器部署webservice调用出错 MVC C#

    C# WebService在本地调用正常,同样的代码布睹到服务器上总是调用报如下错误 Server Error in '/' Application. The resource cannot be f ...

  6. C# 发送16进制串口数据

    一个困扰两天的问题:需要通过串口向设备发送的数据:0A010 7e 08 00 11 00 00 7e 76 7f我先将每个16进制字符转换成10进制,再将其转换成ASCII码对应的字符. /// & ...

  7. 【Python55--爬虫:代理】

    一.反爬虫之隐藏 1.网站检查访问的是正常用户还是程序,关键在于User-Agent 1).第一种方法:采用header --修改header(两种方法): -->  在Request之前通过h ...

  8. 【Python042--魔法方法:算术运算】

    一.算术魔法方法的举例 1.加法(__add__)的算术运算调用减法(__sub__)的算术运算,减法(__sub__)的算术运算调用加法(__add__)的算术运算 class New_Init(i ...

  9. topcoder srm 681 div1

    problem1 link 二分答案.然后判断.将所有的机器按照$a_{i}$排序,$a_{i}$相同的按照$b_{i}$排序.用一个优先队列维护这些机器.这样对于第$i$个部分,拿出队列开始的机器来 ...

  10. Elasticsearch 异常处理

    cluster_block_exception https://stackoverflow.com/questions/50609417/elasticsearch-error-cluster-blo ...