Hello Manikandan,
In the
servlet v2.3 specification, the web.xml DTD did in fact verify the proper tag ordering. However, in servlet v2.4 this ordering is no longer validated. My guess why this was done is to allow the developer to group related declarations together. For example, if you were to declare 20 <servlet> definitions and followed by 20+ <servlet-mapping> definitions, it might be confusing to read the DD. However, in v2.4 the developer can group the <servlet> and <servlet-mapping> declarations together. Thus enhancing readability of the DD.
HTH,
Bryan