What is the meaning of web.xml id attribute of the web-app tag?
Eclipse generated it as id=”WebApp_ID”. I was using version the Servlet specification version 2.5, I switched to using 3.0, with the suggestion of this answer that doesn’t include that id.
Is it really necessary? What is the value supposed to be?
The newer versions of the servlet spec use .xsd files with no further information on the id attribute, but if you go back to the older versions with .dtd, such as web_app_2_2.dtd, you find:
For example, WebSphere Application Server used the id mechanism in its old bnd and ext files:
(Thankfully, this is tool-friendly-but-developer-annoying use of id attributes is no longer necessary with the newer .xml file format for ibm-web-bnd/ext, but I digress.)