Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

web.xml issue

 
Jason Kretzer
Ranch Hand
Posts: 280
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all,
I am having problems with my web.xml file. When I start Tomcat 4.0.4, I get the following on my DOS window:

Also, here is my web.xml file. Note:When I delete the portion dedicated to the TopLineGenerator, the HelloWorld servlet comes up fine. But neither comes up when I add it in and I get the message above.

Any ideas?
Thanks,
[ June 26, 2002: Message edited by: Jason Kretzer ]
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML DTD's give you the required structure of XML files. You are throwing a parse exception, so something is wrong with your structure.

As a guide...
(icon?, display-name? ... context-param*, filter* ... servlet*, servlet-mapping* ...)

( - start the element
? - optional
* - can be 0 to many
, - list seperator -> order IS implied.
(and ... is my way of snipping out things)

So the above example could be read out: A web-app element is composed of optionally an icon followed by optionally a display-name followed by zero or more context-params followed by zero or more filters followed by zero or more servlets followed by zero or more servlet-mappings

the "order IS implied" is the big clue.
[ June 26, 2002: Message edited by: Mike Curwen ]
 
Anthony Villanueva
Ranch Hand
Posts: 1055
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just list ALL your <servlet> elements first, followed by the <servlet-mapping> elements.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic