0

2.5xsdおよび3.0xsd。なぜ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>
4

1 に答える 1

3

Web.xmlの自動生成機能(このコードを?で生成)は、xmlns:webとxsi:schemaLocationの最後のより良いバージョンを選択するためです。

web.xmlの2つの要素に異なるxsdバージョンがあることは問題ではないと思います。問題がある場合は、2.5バージョンに移動してください。

JSPを使用しているようですが、JSF2.0 +Primefaces3.2を検討したほうがよいでしょうか。

于 2012-05-31T07:49:02.917 に答える