问题描述
<?xmlversion="1.0"encoding="UTF-8"?><web-appversion="2.4"xmlns="http://java.sun.com/xml/ns/j2ee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/j2eehttp://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"></web-app>在eclipse里xml里就写这几句,上边的version的地方提示错误badstream:version-"2.4"这是为什么?
解决方案
解决方案二:
<?xmlversion="1.0"encoding="UTF-8"?><!DOCTYPEweb-appPUBLIC"-//SunMicrosystems,Inc.//DTDWebApplication2.3//EN""http://java.sun.com/dtd/web-app_2_3.dtd">声明的问题把,version-"2.4"无法解析,造成错误
解决方案三:
把version-"2.4"去掉看可不可以期待
解决方案四:
或者换成:<?xmlversion="1.0"encoding="UTF-8"?><web-appversion="2.5"xmlns="http://java.sun.com/xml/ns/javaee"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:schemaLocation="http://java.sun.com/xml/ns/javaeehttp://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"></web-app>