aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes error in web.xml (Tomcat) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "error in web.xml (Tomcat)" Watch "error in web.xml (Tomcat)" New topic
Author

error in web.xml (Tomcat)

Anjuga Selvan
Greenhorn

Joined: Mar 24, 2005
Posts: 1
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

Joined: Mar 09, 2005
Posts: 61
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.


BS<br />SCJP 1.4 88%<br />SCWCD 1.4 86%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in web.xml (Tomcat)
 
Similar Threads
How to use JSTL varraible in to jsp
Scriptless JSP
Doubt in EL?
JSTL1.2 -Unknown element(deferred-value)
using JSTL and EL to get/set request parameters