Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 33661 invoked from network); 4 Dec 2006 21:58:16 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 4 Dec 2006 21:58:16 -0000 Received: (qmail 81068 invoked by uid 500); 4 Dec 2006 21:58:19 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 80518 invoked by uid 500); 4 Dec 2006 21:58:16 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 80507 invoked by uid 500); 4 Dec 2006 21:58:16 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 80504 invoked by uid 99); 4 Dec 2006 21:58:16 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 13:58:16 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 04 Dec 2006 13:58:07 -0800 Received: by brutus.apache.org (Postfix, from userid 33) id 8F9397142BF; Mon, 4 Dec 2006 13:57:47 -0800 (PST) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 41106] New: - "deferred" expression fails if less than 2.0 Message-ID: X-Bugzilla-Reason: AssignedTo Date: Mon, 4 Dec 2006 13:57:47 -0800 (PST) X-Virus-Checked: Checked by ClamAV on apache.org DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG� RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT . ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND� INSERTED IN THE BUG DATABASE. http://issues.apache.org/bugzilla/show_bug.cgi?id=41106 Summary: "deferred" expression fails if less than 2.0 Product: Tomcat 6 Version: 6.0.0 Platform: Other OS/Version: other Status: NEW Severity: normal Priority: P2 Component: Jasper AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: stan@jboss.com Some JSF taglibs such as Ajax4JSF mark the jsp-version tag in the TLD like this: 1.2 Then if a developer says something like action="#{foo}" in an Ajax4JSF tag, he will get this: This causes Ajax4JSF to fail with this error: org.apache.jasper.JasperException: /index.jsp(26,4) According to TLD or attribute directive in tag file, attribute action does not accept any expressions org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40) org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:406) org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:147) Jasper tries to check the in the TLD to see if the version is 2.1 and the attribute is not allowing deferred expressions. However, pre-2.1, "#{" had no meaning and was always allowed. In Validator.java, Jasper has this line: boolean checkDeferred = !tagInfo.getTagLibrary().getRequiredVersion().equals("2.0"); The problem is that while the logic will work if the TLD says 2.0, it won't work for any jsp-version below that. A better way would be to say something like: float taglibRequiredVersion = Float.parseFloat(tagInfo.getTagLibrary().getRequiredVersion()); boolean checkDeferred = taglibRequiredVersion > 2.0f; I tried this and it works. However, this is not a complete fix because it doesn't catch NumberFormatException. Also, some refactoring might be in order because this same logic is found elsewhere in Validator.java and also in TagFileDirectiveVisitor. I'm not sure if the logic in those two places is correct or not. I'm attaching a war with a simple tag that demonstrates the problem. Stan -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org