2.5 xsd和3.0 xsd。为什么有2个xsd?
Project Spec:
Server info: Apache Tomcat/7.0.27
Servlet version: 3.0
JSP version: 2.1
Java version: 1.6.0_32
<?xml version="1.0" encoding="UTF-8"?>
<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_3_0.xsd"
id="WebApp_ID" version="3.0">
<display-name>MyFirstApp</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
</web-app>发布于 2012-05-31 15:49:03
因为您的自动生成器(使用?生成此代码)为您的xmlns: Web.xml和xsi:schemaLocation选择最新且更好的版本。
我认为在web.xml的两个元素上有不同的xsd版本不是问题。如果您有问题,请转到2.5版本。
我知道你在使用JSP,也许更好的选择是JSF2.0 + Primefaces 3.2?
https://stackoverflow.com/questions/10829350
复制相似问题