aspose file tools*
The moose likes Servlets and the fly likes Websphere unable to parse Web.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Websphere unable to parse Web.xml " Watch "Websphere unable to parse Web.xml " New topic
Author

Websphere unable to parse Web.xml

Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
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

Joined: Sep 13, 2005
Posts: 238
Sorry, I think double pasted the xml. Here is the real one.

Hussein Baghdadi
clojure forum advocate
Bartender

Joined: Nov 08, 2003
Posts: 3479

web-app element doesn't accept id attribute, try to remove it.
Muhammad Imad Qureshi
Ranch Hand

Joined: Sep 13, 2005
Posts: 238
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

Joined: Nov 08, 2003
Posts: 3479

Try to move the new servlet definition and place it with other servlets definitions, servlets-mapping should follow.
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
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

Joined: Sep 13, 2005
Posts: 238
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

Joined: Nov 08, 2003
Posts: 3479

Just group servlets definitions together.
To be more specific, follow web-app_2_3.dtd rules.
Mark E Hansen
Ranch Hand

Joined: Apr 01, 2009
Posts: 650
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

Joined: Sep 13, 2005
Posts: 238
thanks guys. It worked.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Websphere unable to parse Web.xml