在weblogic下发布java工程,加载web.xml 报错
Deployment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException:
1.首先看一下你的包头文件
<web-app version="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/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
修改为:
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd">
2. 其次看看自己的web.xml子元素的加载顺序
<web-app>
<display-name>
<description>
<distributable>
<context-param>
<filter>
<filter-mapping>
<listener>
<servlet>
<servlet-mapping>
<session-config>
<mime-mapping>
<welcome-file-list>
<error-page>
<taglib>
<resource-env-ref>
<resource-ref>
<security-constraint>
<login-config>
<security-role>
<env-entry>
<ejb-ref>
<ejb-local-ref>
</web-app>