Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

error in web.xml (Tomcat)

 
Anjuga Selvan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I tried to deploy a web app using Deployment Descriptor for the first time. When starting the server i am getting an error -"org.xml.sax.SAXParseException: Element type "web-app" must be declared."

The following is what i have in my web.xml. I am using Tomcat4.0.1 and jdk1.3. What might be the problem and what is the solution ? Can anyone plz help me in this regard?


<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_4.dtd">

<web-app 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/web-app_2_4.xsd" version="2.4">
// DD elements go here.

</web-app>

Thanks in advance,
Anju.
 
Bassam Zahid
Ranch Hand
Posts: 61
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all please upgrade your Tomcat and JDK version.

On Tomcat 4.x you cannot use Servlet 2.4 and JSP 2.0 specification.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic