Development Environment: Java Runtime: version "1.4.2" Tomcat: version 5.0.19 I'm following the Free PDF book entitled 'Core Servlets and JavaServer Pages' 1st ed. by Marty Hall. The topic is all about Tag Library.. he pointed out that the example is based on Tomcat 3.1 beta (which I suspect is the cause of my problem). Anyway, I got an error which prevented me from continuing my experiment... The tld file is based on the example on the book.. thanks! jm
The files involved in my experiment
SimpleTag.java (tag handler):
Learning new things, I LIKE!<p>---certification---<br />none so far, experience (considerable, yeah)
After removing the <urn></urn> the error becomes...
type Exception report message description The server encountered an internal error () that prevented it from fulfilling this request. exception org.apache.jasper.JasperException: XML parsing error on file /jspTest/tags/./simpletag-taglib.tld: (line 26, col 10): The content of element type "tag" must match "(name,tagclass,teiclass?,bodycontent?,info?,attribute*)". at org.apache.jasper.xmlparser.ParserUtils.parseXMLDocument(ParserUtils.java:189) at org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:243) at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:183) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354)
Hi Raul, Keep in mind, XML is a semi-structure document. The order of the attributes or sub-element does matter. You can also check (or validate) your document by some tools, like XML Spy, to see whether your XML document is correct. Nick.