關于idea-web.xml版本過低怎么生成新的(web.xml報錯)問題
版本:
一、版本過低,web.xml報錯,報錯信息為:
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*)
用的是maven創建的的javaweb項目,其web.xml版本默認是Servlet2.3模板。
二、解決辦法:更換web.xml版本
操作之前將web.xml文件中的配置復制粘貼出來
Apply-OK后可以看到項目中的web.xml文件沒了
重新添加web.xml文件:
將操作之前粘貼出來的配置,放進新的web.xml文件中即可,不再報錯
到此這篇關于idea-web.xml版本過低怎么生成新的(web.xml報錯)的文章就介紹到這了,更多相關idea-web.xml版本低內容請搜索好吧啦網以前的文章或繼續瀏覽下面的相關文章希望大家以后多多支持好吧啦網!
相關文章: