Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tomcat -web.xml parseing error

 
Kusum Mandore
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
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
"(icon?,display-name?,description?,distributable?,context-param*,filter*,filter-
mapping*,listener*,servlet*,servlet-mapping*,session-config?,mime-mapping*,welco
me-file-list?,error-page*,taglib*,resource-env-ref*,resource-ref*,security-const
raint*,login-config?,security-role*,env-entry*,ejb-ref*,ejb-local-ref*)".
Starting service Tomcat-Apache
Apache Tomcat/4.0.1
------------------------------------------------------

i have also changed the path specified for my conf file(dessdocs.properties).. in web.xml
following is the part of web.xml file that i am using..which may have a problem..i guess.
...
<servlet>
<servlet-name>DessdocsManager</servlet-name>
<servlet-class>com.ddocs.DessdocsManager</servlet-class>
<init-param>
<param-name>ConfigPath</param-name>
<param-value>dessdocs.properties</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
...

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
Bartender
Posts: 3150
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kusum,
Welcome to Javaranch, I am moving this question to Tomcat forum, Folks there may help you.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13071
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
Bill
 
Ramaswamy Srinivasan
Ranch Hand
Posts: 295
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?

Cheers,
Swamy.
 
Dark Vachor
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
thanx
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic