This week's book giveaway is in the Python forum.
We're giving away four copies of Hello World and have Warren & Carter Sande on-line!
See this thread for details.
Win a copy of Hello World this week in the Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Bear Bibeault
  • Liutauras Vilda
  • Devaka Cooray
Sheriffs:
  • Knute Snortum
  • Junilu Lacar
  • Henry Wong
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • salvin francis
  • Frits Walraven
  • Piet Souris

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

 
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
 
Ranch Hand
Posts: 235
Python Spring Java
  • 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
 
You can't expect to wield supreme executive power just because
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!