修改了一下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. 输出链表中倒数第k个节点

    题目描述 输入一个链表,输出该链表中倒数第k个结点. struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x ...

  2. 学写网页 #06# table

    A B E C D <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> & ...

  3. Forword(请求转发)与Redirect(重定向) 区别

    1.从数据共享上 Forword是一个请求的延续,可以共享request的数据 Redirect开启一个新的请求,不可以共享request的数据 2.从地址栏 Forword转发地址栏不发生变化 Re ...

  4. maven maven.compiler.source和maven.compiler.target的坑

    最近建议产品组把jdk 1.7升级到1.8,昨晚开发报了个问题过来,说maven.compiler.source和maven.compiler.target改成1.8之后,编译出来的代码还是1.7,如 ...

  5. topcoder srm 495 div1

    problem1 link 从前向后确定一下,然后再从后向前确定一下.一样的话就是可以确定的. problem2 link 首先将强连通分量缩点.理论上来说,只需要遍历所有入度为0的联通块中的一个即可 ...

  6. TFS 报错解决方案:tf400324

    同事的解决方案没报这个问题将他的C:\Windows\System32\drivers\etc\hosts文件覆盖自己的文件,主要备份自己的文件不行了替换掉

  7. fw-cloud-framework项目配置、启动问题

    1.config组件:其配置优先级高于每个注册到同一个中心的工程的本地配置,所以在统一以dev这个 profile启动各个项目时,去config中心中找-dev结尾的各个工程名命名的文件. confi ...

  8. R read.tabe line 5 did not have 2 elements

    R read.tabe  line 5 did not have 2 elements Reason: there are special characters such as # in file o ...

  9. ZJOI 2015 幻想乡战略游戏(动态点分治)

    题意 https://loj.ac/problem/2135 思路 首先要明确一点,答案分布是有单调性的.什么意思呢?假设我们的答案在 \(u\) 节点,\((u,v)\) 之间有一条边且 \(u\) ...

  10. 微服务架构与实践4_Docker

    构建Docker映像 定义Dockerfile=>Docker根据Dockerfile构建出映像 包含: 基础映像(父映像)信息 维护者信息 映像操作命令 容器启动命令 .net standar ...