This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Tomcat  -web.xml parseing error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat  -web.xml parseing error" Watch "Tomcat  -web.xml parseing error" New topic

Tomcat -web.xml parseing error

Kusum Mandore

Joined: Oct 08, 2004
Posts: 3
i am using Apache Tomcat/4.0.1 on my windows professional .
i am trying to deploy my existing code running on tomcat-4.1.29(linux platform).
but after doing that whenever i start my windows tomact i get the follwoing error messages.
Starting service Tomcat-Standalone
Apache Tomcat/4.0.1
PARSE error at line 61 column 11
org.xml.sax.SAXParseException: The content of element type "web-app" must match
Starting service Tomcat-Apache
Apache Tomcat/4.0.1

i have also changed the path specified for my conf file( in web.xml
following is the part of web.xml file that i am using..which may have a problem..i guess.

can any rancher tell me what might be the problem with web.xml ??
since it works on linux platform....
please help me out..
Balaji Loganathan
author and deputy

Joined: Jul 13, 2001
Posts: 3150
Hi Kusum,
Welcome to Javaranch, I am moving this question to Tomcat forum, Folks there may help you.

Spritle Software Blogs
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
Looks to me like that exception is saying that there is a web.xml element out of place in the vicinity of line 61. Are you really really sure that there is no typo or other silly error that crept in when moving the application?
Ramaswamy Srinivasan
Ranch Hand

Joined: Aug 31, 2004
Posts: 295
Hi Kusum,

Welcome to Javaranch...Hope you have a nice time here.

A Sugession from me..

Could it be due to the change in the order, in which the elements need
to be defined in the web.xml file?

I got a similar error and that was due to my mis-ordering the elements.

Check it out with the error message in the console, that describes the
order to be followed.

Any comments?

Dark Vachor

Joined: Oct 13, 2004
Posts: 14
Check your elements correctness and *ordering*.
It should solve ur problem.

It is sad apache software cannot help much with their error message. They are often inapropriate / wrong. And code intercepting exceptions and replacing them with their own exception should definitely be banned !
ASF loves reinventing the wheel, but they do it in a worng way : each cycle is more buggy and less performant than the previous one !
They should definitely stop doing all their stuff with their classes, and have a closer look at Java classes, the JRE system libraries. 3/4 of the code of httpclient, for instance, is useless, and moreover buggy.
What makes me also furious is that you have to have the crappy log4j library everywhere. It is slow and bloated. It's time to leave it.
Kusum Mandore

Joined: Oct 08, 2004
Posts: 3
Thanx for the reply's
i got the problem solved...i think it was a Tomact version problem...
i upgraded to 4.1.31 and it worked.
I agree. Here's the link:
subject: Tomcat -web.xml parseing error
It's not a secret anymore!