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