• Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet deployment error in web.xml on WSAD 4.x  RSS feed

 
Ashok Haluvarthi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
while deploying the servlet I am getting following error, when I keep more than one servlet entry in my web.xml. I am running this application on WSAD 4.x. Please let me know, if any body came acoss this kind of problem.
org.xml.sax.SAXParseException: The content of element type "web-app" must match "(icon?,display-name?,description?,distributable?,context-param*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welcome-file-list?,error-page*,taglib*,resource-ref*,security-constraint*,login-config?,security-role*,env-entry*,ejb-ref*)".
at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1196)
My web.xml contains....
<?xml version="1.0" encoding="UTF-8"?>
<!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 id="WebApp">
<display-name>xKanbanWeb</display-name>
<servlet>
<servlet-name>ComponentList</servlet-name>
<display-name>ComponentList</display-name>
<servlet-class>com.emerson.ekanban.servlets.ComponentListServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>ComponentList</servlet-name>
<url-pattern>ComponentList</url-pattern>
</servlet-mapping>

<servlet>
<servlet-name>Authentication</servlet-name>
<display-name>Authentication</display-name>
<servlet-class>com.emerson.ekanban.servlets.AuthenticationServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Authentication</servlet-name>
<url-pattern>eKanban/Authentication</url-pattern>
</servlet-mapping>

<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>

thanks
Anil
 
Debashish Chakrabarty
Ranch Hand
Posts: 231
Firefox Browser Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error says it load and clear. All the mappings must come after all the servlets have been declared. This should work
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!