4 Replies Latest reply on Apr 1, 2010 9:16 AM by Matthias Paul Scholz

    order of attributes in web-app node of web.xml seems to matter with JBoss 6 M2

    Matthias Paul Scholz Novice

      Hi,

       

      I've noticed that the order of the attributes in the top-level <web-app> node in the web-xml of a web application that gets deployed into a JBoss 6 server seems to matter:

       

      Deploying to JBoss 6 M2  a web app with a web.xml that starts with

       

      <web-app  xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" version="3.0">

       

      works fine.

       

      Changing the node to

       

      <web-app  version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd">

       

      (i.e., simply moving the version node to be the first attribute instead of the last), though, triggers a org.jboss.xb.binding.JBossXBRuntimeException on deployment, stating "Element {http://java.sun.com/xml/ns/javaee}web-app is not bound to a global element".

       

      This has not been the case with JBoss 5 (and version 2.5), has it?

       

      Did someone encounter a similar behavior?

       

      Tested with JBoss JBossAS [6.0.0.20100216-M2 (build: SVNTag=JBoss_6_0_0_20100216-M2 date=20100216)].