-
The content of element type (10 messages)
- Posted by: p k
- Posted on: July 26 2005 03:35 EDT
Hi,
I'm trying to deploy an application with web.xml as below, but it gives me the following error on websphere, while the same thing works fine in weblogic.
[wsjspc] com.ibm.etools.archive.exception.DeploymentDescriptorLoadException: WEB-INF/web.xml
[wsjspc] Stack trace of nested exception:
[wsjspc] com.ibm.etools.j2ee.exception.WrappedRuntimeException: IWAE0099E An Exception occurred while parsing xml: Line #: 122 :Column #: 11
[wsjspc] Stack trace of nested exception:
[wsjspc] 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*)".
[wsjspc] at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
[wsjspc] at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
[wsjspc] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[wsjspc] at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
[wsjspc] at org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown Source)
[wsjspc] at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown Source)
[wsjspc] at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
(....)
my web.xml is as below...
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
"http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">
<web-app>
<!-- Application Startup Class -->
<listener>
<listener-class>com.amdocs.cs.infra.common.ui.VRStatupManager</listener-class>
</listener>
<!-- General description of your web application -->
<display-name>SuRF</display-name>
<description>
This is version 0.1b of an application to perform
a wild and wonderful task, based on servlets and
JSP pages.
</description>
<!-- Multi Language Support -->
<context-param>
<param-name>weblogic.httpd.inputCharset./*</param-name>
<param-value>UTF-8</param-value>
</context-param>
<!-- Multi Language Support Configuration -->
<!-- Action Servlet Configuration -->
<servlet>
<servlet-name>action</servlet-name>
<servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
<init-param>
<param-name>application</param-name>
<param-value>VRGUIResourceBundle</param-value>
</init-param>
<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>0</param-value>
</init-param>
<init-param>
<param-name>detail</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>validate</param-name>
<param-value>true</param-value>
</init-param>
<init-param>
<param-name>locale</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- Example filter to set character encoding on each request -->
<servlet>
<servlet-name>resource</servlet-name>
<servlet-class>com.amdocs.cs.infra.web.servlet.ResourceBundleLocalizationServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- Action Servlet Mapping -->
<servlet-mapping>
<servlet-name>action</servlet-name>
<url-pattern>*.do</url-pattern>
</servlet-mapping>
<!-- Define the default session timeout for your application,
in minutes. From a servlet or JSP page, you can modify
the timeout for a particular session dynamically by using
HttpSession.getMaxInactiveInterval(). -->
<welcome-file-list>
<welcome-file>/AppInit.do</welcome-file>
</welcome-file-list>
<session-config>
<session-timeout>30</session-timeout> <!-- 30 minutes -->
</session-config>
<!-- Struts Tag Library Descriptors -->
<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>
<!-- end Struts Tag Library Descriptors -->
<taglib>
<taglib-uri>/WEB-INF/vr-ui.tld</taglib-uri>
<taglib-location>/WEB-INF/vr-ui.tld</taglib-location>
</taglib>
<!-- persona parameters -->
<context-param>
<param-name>weblogic.servlet.reloadCheckSecs</param-name>
<param-value>0</param-value>
</context-param>
<error-page>
<exception-type>javax.servlet.jsp.JspException</exception-type>
<location>/error/error.jsp</location>
</error-page>
</web-app>Threaded Messages (10)
- As the error says by Steven Peh on July 26 2005 05:39 EDT
- As the error says by Kristen Henry on May 28 2009 13:56 EDT
- Thanks by Mike Antonio on August 12 2005 07:44 EDT
- Re: The content of element type "web-app" must match by Madhusudhan Mukthavaram on February 22 2010 09:29 EST
- Usefull by davide dc on February 20 2011 10:52 EST
- error in web.xml file in web-app element by Surya kiran on August 22 2012 09:34 EDT
- Easily Remove Trojan Horse Agent3.WJV – Trojan Manual Removal by Chok Dawson on August 27 2012 02:13 EDT
- codes by matt coleman on December 06 2012 00:58 EST
- Great Post by PS expert on December 08 2012 13:05 EST
- good day by club stork on April 03 2013 04:31 EDT
-
As the error says[ Go to top ]
- Posted by: Steven Peh
- Posted on: July 26 2005 05:39 EDT
- in response to p k
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*)". [wsjspc]
As it says, the contents nested inside the <web-app></web-app>
tags must match the list given, and preferably in the same order. In your web.xml, you have the <listener> tags as the first set of tags, look at the list above, should it come first? -
As the error says[ Go to top ]
- Posted by: Kristen Henry
- Posted on: May 28 2009 13:56 EDT
- in response to Steven Peh
Your comment is almost 4 years old but it was a great help to me... I reordered the elements and took out the spaces. Thanks! -
Thanks[ Go to top ]
- Posted by: Mike Antonio
- Posted on: August 12 2005 07:44 EDT
- in response to p k
Thanks for the tip ... -
Re: The content of element type "web-app" must match[ Go to top ]
- Posted by: Madhusudhan Mukthavaram
- Posted on: February 22 2010 09:29 EST
- in response to p k
Even now, it has helped me, the red marks shown through eclipse were really irritating, and ordering the elements has fixed the issue. Thanks a ton. -
Usefull[ Go to top ]
- Posted by: davide dc
- Posted on: February 20 2011 10:52 EST
- in response to p k
Helped me too. Thanks!
-
error in web.xml file in web-app element[ Go to top ]
- Posted by: Surya kiran
- Posted on: August 22 2012 09:34 EDT
- in response to p k
<web-app>
<!-- Main servlet of Struts -->
<servlet>
<servlet-name>main</servlet-name>
<servlet-class>com.pandora.gui.struts.action.GeneralStruts</servlet-class>
<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/struts-config.xml </param-value>
</init-param>
<init-param>
<param-name>application</param-name>
<param-value>ApplicationResources</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<!-- the kickoff servlet used to setup Plandora startup parameters -->
<servlet>
<servlet-name>kickoff</servlet-name>
<servlet-class>com.pandora.gui.struts.action.SystemStartup</servlet-class>
<init-param>
<param-name>timer</param-name>
<param-value>ON</param-value>
</init-param>
<init-param>
<param-name>data_source</param-name>
<param-value>jdbc/plandora</param-value>
</init-param>
<init-param>
<param-name>sys_protocol</param-name>
<param-value>http</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<!-- this servlet is used to expose public link for file downloads (only public attachments). -->
<servlet>
<servlet-name>file</servlet-name>
<servlet-class>com.pandora.gui.struts.action.PublicFileDownload</servlet-class>
<init-param>
<param-name>enable</param-name>
<param-value>ON</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>file</servlet-name>
<url-pattern>/file/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>main</servlet-name>
<url-pattern>/do/*</url-pattern>
</servlet-mapping>
<!-- this servlet is used to expose public link for artifact downloads (only public artifacts). -->
<servlet>
<servlet-name>artifact</servlet-name>
<servlet-class>com.pandora.gui.struts.action.PublicArtifactDownload</servlet-class>
<init-param>
<param-name>enable</param-name>
<param-value>ON</param-value>
</init-param>
<load-on-startup>3</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>artifact</servlet-name>
<url-pattern>/artifact/*</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>360</session-timeout> <!-- in minutes -->
</session-config>
<resource-ref>
<description>PLANdora mySQL connection</description>
<res-ref-name>jdbc/plandora</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
<!--
<filter>
<filter-name>SetCharacterEncoding</filter-name>
<filter-class>filters.SetCharacterEncodingFilter</filter-class>
<init-param>
<param-name>encoding</param-name>
<param-value>UTF-8</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>SetCharacterEncoding</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
-->
<taglib>
<taglib-uri>/WEB-INF/lib/struts-bean</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-bean.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/lib/struts-html</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-html.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/lib/struts-logic</taglib-uri>
<taglib-location>/WEB-INF/lib/struts-logic.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/lib/display</taglib-uri>
<taglib-location>/WEB-INF/lib/display.tld</taglib-location>
</taglib>
<taglib>
<taglib-uri>/WEB-INF/lib/plandora-html</taglib-uri>
<taglib-location>/WEB-INF/lib/plandora-html.tld</taglib-location>
</taglib>
</web-app> -
Easily Remove Trojan Horse Agent3.WJV – Trojan Manual Removal[ Go to top ]
- Posted by: Chok Dawson
- Posted on: August 27 2012 02:13 EDT
- in response to Surya kiran
-
codes[ Go to top ]
- Posted by: matt coleman
- Posted on: December 06 2012 00:58 EST
- in response to p k
thank for sharing the codes here buffalo search engine optimization
-
Great Post[ Go to top ]
- Posted by: PS expert
- Posted on: December 08 2012 13:05 EST
- in response to matt coleman
Great post, please keep on posting these kind of articles. Also Please do not forget to watch http://www.3dmaxmodels.com
-
good day[ Go to top ]
- Posted by: club stork
- Posted on: April 03 2013 04:31 EDT
- in response to p k
great info about the element type