這些XML驗證結果實際上代表什麼?XML驗證缺失標記
「nbres:/org/netbeans/modules/j2ee/ddloaders/catalog/resources/datatypes.dtd」中的引用實體。 cvc-complex-type.2.4.a:找到以元素「filter-name」開頭的無效內容。 「{」http://java.sun.com/xml/ns/javaee":description,「http://java.sun.com/xml/ns/javaee":display-name」,http:/ /java.sun.com/xml/ns/javaee":icon,「http://java.sun.com/xml/ns/javaee":servlet-name}」。 [48] 元素類型「servlet」必須由匹配的結束標記「」終止。 [50] XML驗證已完成。
我不太熟悉這些!
我的文件:
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="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/javaee
http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<display-name>KeyCard</display-name>
- <context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/applicationContext.xml
/WEB-INF/tilesViewContext.xml
/WEB-INF/ldap-config.xml
/WEB-INF/security-config.xml
/WEB-INF/idm-config.xml
</param-value>
</context-param>
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<filter>
<filter-name>charsetFilter</filter-name>
<filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
<init-param>
<param-name>forceEncoding</param-name>
<param-value>true</param-value>
</init-param>
</filter>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>charsetFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet>
<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<listener>
<listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>
</listener>
<listener>
<listener-class>org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<servlet-name>KeyCard</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>KeyCard</servlet-name>
<url-pattern>*.html</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>120</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>
請仔細閱讀你的問題,看看你能否理解它 - 我懷疑其他人會 - 你需要將xml格式化爲代碼 – Mark 2011-02-14 11:44:09