atom feed17 messages in org.apache.tomcat.usersJasper complains when parsing valid T...
FromSent OnAttachments
Mark R. DiggoryOct 7, 2002 7:43 am 
Jean-Francois ArcandOct 7, 2002 7:49 am 
Mark R. DiggoryOct 7, 2002 8:11 am 
Mark R. DiggoryOct 7, 2002 11:44 am 
Craig R. McClanahanOct 7, 2002 11:48 am 
Mark R. DiggoryOct 7, 2002 12:18 pm 
Craig R. McClanahanOct 7, 2002 12:31 pm 
Mark R. DiggoryOct 7, 2002 12:37 pm 
Mark R. DiggoryOct 7, 2002 12:46 pm 
Craig R. McClanahanOct 7, 2002 2:06 pm 
Brandon CruzOct 7, 2002 2:39 pm 
Mark R. DiggoryOct 7, 2002 5:41 pm 
Mark R. DiggoryOct 7, 2002 5:52 pm 
Mark R. DiggoryOct 8, 2002 7:16 am.zip
Jan LueheOct 8, 2002 10:00 am 
Mark R. DiggoryOct 9, 2002 12:36 pm 
Mark R. DiggoryOct 9, 2002 12:51 pm 
Subject:Jasper complains when parsing valid TLD (was: Can't deploy Custom Tag Library ... )
From:Mark R. Diggory (mdig@latte.harvard.edu)
Date:Oct 8, 2002 7:16:17 am
List:org.apache.tomcat.users
Attachments:
Test.zip - 9k

Jean-Francois Arcand wrote:

Well, after reading all you mail/exchange (look at my email-address....Craig have the same ;-) ), you should take time to think/re-read your stuff before sending that type of email. I know it's frustrating, but .....

Point well taken, I apoligize if anyone found it irritating. I know I can be overbearing sometimes with my opinion. ;-) But I'll still argue that Sun made some bad decisions in packaging all this "stuff" into j2sdk.

Anyway, back to real work! I have a feeling that you tld file is maybe not xml compliant or you are facing a bug that I have fixed with Xerces in Tomcat:

But IMBW..I'm sure it's something like that. Maybe Forte4J (made by SUN ;-) ) is doing something under the hood......also, try with Xerces 2.1. I know, Crimson has the same problem, but maybe there is a bug in both version. Anyway, I'm probably not the best person for that problem, but try to post you problem on the xerces-j mailling list (xml.apache.org). Maybe you will have sometings better than my recommendation....

-- Jeanfrancois

With this in mind, I decided to provide a test example to see if it is truly an issue with Tomcat and not with Forte. So I took the log tag out of the examples directory and placed it into its own log.jar with tld descriptor. In this war one can see the following layout.

/Test/WEB-INF/lib/log.jar (containing the examples/log tag classes and tld file). /Test/WEB-INF/web.xml (tag descriptor referencing the jar file) /Test/WEB-INF/build.xml (how the log jar was built) /Test/jsp (example)

What I've found is that ther are two issues going on

1.) The taglib cannot load in 4.0.3, but does load successfully in 4.0.4+ and 4.1.* so this is a bug in 4.0.3 LE and Full on WindowsXP/J2sdk. 2.) Since it works on 4.0.4+ and 4.1.* versions of Tomcat/WindowsXP/J2sdk, there is *something else wrong* with my taglibs that causing failure on those platforms.

I guess I can live without it working on 4.0.3, I'm trying to upgrade anyways, if required I can provide a *work-around* for my developers...

So, on 4.1.* with logging cranked way up, I've been seeing errors that Jasper encountered a TEI class when the tld already has a variable? Very wierd error. Here's an example of a tag in my taglib, if anyone sees anything wrong with this please let me know, it is still valid against the dtd. (again this was a tld generated by Forte4J).

<tag> <name>catch</name> <tag-class>edu.harvard.hmdc.taglib.conditional.CatchTag</tag-class>

<tei-class>edu.harvard.hmdc.taglib.conditional.CatchTagTEI</tei-class> <body-content>JSP</body-content> <description/> <variable> <name-from-attribute>name</name-from-attribute> <variable-class>java.lang.Throwable</variable-class> <declare>true</declare> <scope>NESTED</scope> </variable> <attribute> <name>class_name</name> <required>true</required> <rtexprvalue>false</rtexprvalue> <type>String</type> </attribute> <attribute> <name>name</name> <required>true</required> <rtexprvalue>true</rtexprvalue> <type>String</type> </attribute> <example/> </tag>

Here is the exception in 4.1.12

org.apache.jasper.JasperException: null(-1,-1) variable subelement defined in tld when TagExtraInfo class edu.harvard.hmdc.taglib.conditional.CatchTagTEI is non-null at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:94) at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:417) at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:154) at
org.apache.jasper.compiler.TagLibraryInfoImpl.createTagInfo(TagLibraryInfoImpl.java:386) at
org.apache.jasper.compiler.TagLibraryInfoImpl.parseTLD(TagLibraryInfoImpl.java:273) at org.apache.jasper.compiler.TagLibraryInfoImpl.(TagLibraryInfoImpl.java:183) at org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:354) at org.apache.jasper.compiler.Parser

I get the feeling Forte is generating more information than Jasper Likes.

-Mark