Element filtername is not allowed here-web.xml version="3.0"-intellij idea

 Element filtername is not allowed here-web.xml version="3.0"-intellij idea

Intellij IDEA 報錯,web.xml不能添加 filter:

參見:

http://stackoverflow.com/questions/17563756/element-listener-class-not-allowed-in-my-web-xml

解決方法:

web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
     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"



What's the purpose of xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"? Will it work if you remove it?

刪除紅色的部分即可。



發佈了119 篇原創文章 · 獲贊 41 · 訪問量 36萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章