Just noticed this error in weblogic's stdout:
<Nov 29, 2006 2:12:49 PM PST> <Warning> <HTTP> <BEA-101248> <[ptagis]: Deployment descriptor "web.xml" is malformed. Check against the DTD: org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,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*)". (line 109, column 11).>
This is still an error. Here is what the beginning of web.xml looks like:
<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app _2_3.dtd">
Info from BEA tech support
This error indicates that the elements entries in the web.xml file are out of order. For example, the <welcome-file> entry before the <servlet> and <servlet-mapping> entries. The web.xml elements must be in the following order in the web.xml file: icon, 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. For example, the <servlet-mapping> entries must be positioned below the <servlet> entries but above the <welcome-file-list>: ..... <web-app> <servlet> <servlet-name>CopyProcessServlet</servlet-name> <servlet-class>psm.copyresmap.CopyProcessServlet</servlet-class> </servlet> <servlet> <servlet-name>CaseSuppliesServlet</servlet-name> <servlet-class>psm.casesupplies.CaseSuppliesServlet</servlet-class> </servlet> <servlet> <servlet-name>PickTicketServlet</servlet-name> <servlet-class>psm.picktick.PickTicketServlet</servlet-class> </servlet> .... <servlet-mapping> <servlet-name>CopyProcessServlet</servlet-name> <url-pattern>/CopyProcessServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>CaseSuppliesServlet</servlet-name> <url-pattern>/CaseSuppliesServlet</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>PickTicketServlet</servlet-name> <url-pattern>/PickTicketServlet</url-pattern> </servlet-mapping> ...... <welcome-file-list> <welcome-file>index.html</welcome-file> </welcome-file-list> ....
our web.xml
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <context-param> <param-name>property.path.ptagis</param-name> <param-value>/dsk2/ptagis-1.0/web/ptagis/WEB-INF/ptagis.properties</param-value> </context-param> <context-param> <param-name>property.path.SEFInterface</param-name> <param-value>/dsk2/ptagis-1.0/web/ptagis/WEB-INF/sef.properties</param-value> </context-param> <context-param> <param-name>property.path.db</param-name> <param-value>/dsk2/ptagis-1.0/web/ptagis/WEB-INF/db.properties</param-value> </context-param> <context-param> <param-name>property.path.ldap</param-name> <param-value>/dsk2/ptagis-1.0/web/ptagis/WEB-INF/ldap.properties</param-value> </context-param> <context-param> <param-name>property.path.mail</param-name> <param-value>/dsk2/ptagis-1.0/web/ptagis/WEB-INF/mail.properties</param-value> </context-param> <context-param> <param-name>property.path.siteconfig</param-name> <param-value>/dsk2/ptagis-1.0/web/ptagis/WEB-INF/siteconfig.properties</param-value> </context-param> <listener> <listener-class>util.ApplicationInitializer</listener-class> </listener> <servlet> <servlet-name>RegisteredTagAction</servlet-name> <servlet-class>db.RegisteredTagAction</servlet-class> </servlet> <servlet> <servlet-name>action</servlet-name> <servlet-class>org.apache.struts.action.ActionServlet</servlet-class> <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> <init-param> <param-name>debug</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>detail</param-name> <param-value>2</param-value> </init-param> <init-param> <param-name>validate</param-name> <param-value>true</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet> <servlet-name>Log4jInit</servlet-name> <servlet-class>util.Log4jInit</servlet-class> <init-param> <param-name>config.path</param-name> <param-value>/WEB-INF/log4j.properties</param-value> </init-param> <init-param> <param-name>reload.interval</param-name> <param-value>5000</param-value> </init-param> <load-on-startup>1</load-on-startup> </servlet> <servlet-mapping> <servlet-name>action</servlet-name> <url-pattern>*.do</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>RegisteredTagAction</servlet-name> <url-pattern>/home/regTagAction</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> </welcome-file-list> <taglib> <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri> <taglib-location>/WEB-INF/struts-bean.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri> <taglib-location>/WEB-INF/struts-html.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri> <taglib-location>/WEB-INF/struts-logic.tld</taglib-location> </taglib> <taglib> <taglib-uri>/WEB-INF/struts-template.tld</taglib-uri> <taglib-location>/WEB-INF/struts-template.tld</taglib-location> </taglib> <mime-mapping> <extension>css</extension> <mime-type>text/css</mime-type> </mime-mapping> </web-app>
This is an error because the mime-mapping must come before the welcome-file-list.
But simply moving the mime-mapping stanza to the proper place results in a more significant error from the weblogic parser that prevents deployment.
Module Name: ptagis, Error: [HTTP:101179][HTTP] Error occurred while parsing descriptor in Web application "/dsk2/p tagis-1.0/web/ptagis" [Path="/dsk2/ptagis-1.0/web", URI="ptagis" org.xml.sax.SAXParseException: The markup in the document following the root element must be well-formed.
No comments:
Post a Comment