您的位置:首页 > 其它

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

2016-04-05 11:49 483 查看

 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?

删除红色的部分即可。
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: