Hi all, can anyone explain the different parts of s Tag Library descriptor? <?xml version"1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc // DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
For some reason I had a version 1.2 for the tag library and it many threw errors at me. I found the error and am now under the impression that this is one of those things that you meddle with at your own peril...
but im still like a monkey that gets shocked by an electric fence and goes back becausehe wants to know why he was shocked. chris
What you are showing here is the DTD (Document Type Definition). This is nothing to do with tag libraries specifically but is an XMLism. The DTD allows the XML parser to validate the XML document. In this case it says <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc // DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> The root element of this document is called taglib The 'name' of this DTD is "-//Sun Microsystems, Inc // DTD JSP Tag Library 1.1//EN" The location of this DTD is "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd" If you browse to the URL you will find the DTD. Many IDE's will use the DTD to give you editing completion (intellisense in MS speak) for the XML document.
Kevin Jones<br />Author: <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0321136497/jranch-20" target="_blank" rel="nofollow">Servlets and JSP: The J2EE Web Tier</a>