web.xml总是会自动增加一条xmlns:web,web-app_4_0.xsd变web-app_2_5.xsd,

webapp标签变成了

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSch...; xmlns="http://xmlns.jcp.org/xml/ns/j...; xmlns:web="http://xmlns.jcp.org/xml/ns/j...; xmlns:web="http://xmlns.jcp.org/xml/ns/j...; xsi:schemaLocation="http://java.sun.com/xml/ns/ja... http://java.sun.com/xml/ns/javaee/web-app_4_0.xsd http://xmlns.jcp.org/xml/ns/j... http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="4.0">

关键是我没动它,老自说自话加上那么一条

xmlns:web="http://xmlns.jcp.org/xml/ns/javaee"

之前的版本是
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSch...; xmlns="http://java.sun.com/xml/ns/ja...; xsi:schemaLocation="http://java.sun.com/xml/ns/ja... http://java.sun.com/xml/ns/javaee/web-app_4_0.xsd" id="WebApp_ID" version="4.0">

阅读 2.7k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题