On Tuesday 12 February 2002 04:01 pm, you wrote:
Well, I extracted the TLD file from the JAR the contains my tag library, and 
modified web.xml to point to the TLD iteslf.  This seems to fix the problem.
I guess the code that looks for the TLD is not correctly handling JARs.

The JSP specifiecation (JSP.7.3.2) says: "The TLD resource path ... should 
relolve to a TLD file directly, OR TO A JAR FILE [emphisis mine] that has a 
TLD file at location META-INF/taglib.tld."  It seems that the latter does not 
work well in Tomcat 4.0.2.

> I just downloaded the new Tomcat 4.0.2 and I am having trouble getting my
> web application to load successfully.  ${TOMCAT}/logs/catalina.out shows
> the following lines:
>
> Apache Tomcat/4.0.2
> PARSE error at line 1 column 1
> org.xml.sax.SAXParseException: The markup in the document preceding the
> root element must be well-formed.
> Starting service Tomcat-Apache
> Apache Tomcat/4.0.2
> PARSE error at line 1 column 1
> org.xml.sax.SAXParseException: The markup in the document preceding the
> root element must be well-formed.
>
> Which would seem to indicate that some XML file is bad though the messages
> give no clue to which file has the problem.
>
> After trying a few things I found that if I comments taglib definition
> lines from my web.xml file the error goes away.
>
> The only XML file that I know of that has something to do with the tag
> libraries is META-INF/taglib.tld in my tag library's jar file and I just
> don's see any problem with that (it worked prior to 4.0.2).
>
> Here are some snippets (with parens instead of angle brackets).
>
> --- taglib lines from web.xml ---
>
> ----8<---
>     (taglib)
>         (taglib-uri)http://www.optix.com/tld/oas(/taglib-uri)
>         (taglib-location)/WEB-INF/lib/OASTagLib.jar(/taglib-location)
>     (/taglib)
> ----8<---
>
> --- top of META-INF/taglib.tld from OASTagLib.jar ---
>
> (?xml version="1.0" ?)
>
> (!DOCTYPE taglib
>           PUBLIC
>           "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN"
>           "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd";)
>
> (taglib)
>   (tlibversion)1.0(/tlibversion)
> ----8<---
>
> Can anyone offer some help here?


--
To unsubscribe:   <mailto:[EMAIL PROTECTED]>
For additional commands: <mailto:[EMAIL PROTECTED]>
Troubles with the list: <mailto:[EMAIL PROTECTED]>

Reply via email to