DTD and JAVA versions

gudii9 used Ask the Experts™

I am going through below link


I was not clear on DTDs and Java version relationship and which one to use in WEB.XML.

Please advise
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
I am not an expert on XML stuff. But, I do remember using DTD for web.xml  years ago. The link you posted says
Starting with the J2EE 1.4 specification, each specification requires its Deployment Descriptor be validated with respect to an XML Schema ...

From the programmer's  point of view, the biggest improvement that XML schema gave us was that we didn't have to worry about the order of the tags anymore.   See the paragraph titled "Schema" at  http://www.javaworld.com/article/2073323/java-web-development/servlet-2-4--what-s-in-store.html?page=2    
For some background about DTDs and Schemas, see  https://www.sitepoint.com/xml-dtds-xml-schema/    
I can't answer any technical questions about XML stuff. I am just glad that they changed to using Schema instead of DTD. Prior to the change, if the tag order wasn't just right  our web apps would not work.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial