Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Websphere unable to parse Web.xml

 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We have following web.xml and websphere is throwing following exception. Can anyone please help. This happens during an install on a linux box.

Thanks
Imad



 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I think double pasted the xml. Here is the real one.

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
web-app element doesn't accept id attribute, try to remove it.
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well this application is actually running with id attribute inside web-app. The only thing we are adding with this deployment is following servlet (only following lines are new in web.xml)
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try to move the new servlet definition and place it with other servlets definitions, servlets-mapping should follow.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error you're getting is telling you the order the elements must appear in the web-app element. The elements must appear in the correct order.
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So that means I shoould follow what John said. Is that right? Because each servlet has a load-on-startup =1. Or should I change the load on startup value to 2 for this new servlet?

Thanks
Imad
 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just group servlets definitions together.
To be more specific, follow web-app_2_3.dtd rules.
 
Mark E Hansen
Ranch Hand
Posts: 650
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The <load-on-startup> element has nothing to do with this issue. The problem is in the ordering of the elements within the <web-app> element.
 
Muhammad Imad Qureshi
Ranch Hand
Posts: 238
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks guys. It worked.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic