Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 11142 invoked from network); 29 Dec 2006 10:22:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 29 Dec 2006 10:22:58 -0000 Received: (qmail 18276 invoked by uid 500); 29 Dec 2006 10:23:04 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 17401 invoked by uid 500); 29 Dec 2006 10:23:01 -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 17390 invoked by uid 500); 29 Dec 2006 10:23:01 -0000 Delivered-To: apmail-jakarta-tomcat-dev@jakarta.apache.org Received: (qmail 17387 invoked by uid 99); 29 Dec 2006 10:23:01 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 29 Dec 2006 02:23:01 -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; Fri, 29 Dec 2006 02:22:53 -0800 Received: by brutus.apache.org (Postfix, from userid 33) id 9482B714295; Fri, 29 Dec 2006 02:22:33 -0800 (PST) From: bugzilla@apache.org To: tomcat-dev@jakarta.apache.org Subject: DO NOT REPLY [Bug 41257] New: - EL in dynamic attribute causes NPE in Tomcat 6 Message-ID: X-Bugzilla-Reason: AssignedTo Date: Fri, 29 Dec 2006 02:22:33 -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=41257 Summary: EL in dynamic attribute causes NPE in Tomcat 6 Product: Tomcat 6 Version: 6.0.7 Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Jasper AssignedTo: tomcat-dev@jakarta.apache.org ReportedBy: arjan.tijms@mbuyu.nl Whenever I try to use any EL (either $ or # syntax) in a taglib tag's dynamic attribute in Tomcat 6.0.7, I get the following exception: java.lang.NullPointerException at org.apache.jasper.compiler.Generator$GenerateVisitor.evaluateAttribute(Generator.java:2777) at org.apache.jasper.compiler.Generator$GenerateVisitor.generateSetters(Generator.java:2988) at org.apache.jasper.compiler.Generator$GenerateVisitor.generateCustomStart(Generator.java:2169) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1689) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336) at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2386) at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1705) at org.apache.jasper.compiler.Node$CustomTag.accept(Node.java:1507) at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2336) I traced into the source code of Tomcat 6.0.7 with a debugger and found out the exception is caused by the code at the mentioned line 2777 of Generator.java, which is trying to request a TagAttributeInfo from the current attribute, but for a dynamic attribute the JspAttribute.tai field is always null. When I debug the evaluateAttribute method in question, I see that for Node.JspAttribute attr, the "dynamic" field (attr.dynamic) is correctly set to true and attr.getLocalName() returns the correct name of the dynamic attribute. At line 2771 attr.isELInterpreterInput() returns true, since attr.el != null. When I inspect attr.el, I see the EL expresion is correctly parsed. Only, a few lines below that the code fails with the NPE upon accessing the TagAttributeInfo object tai (which is, as said always null for dynamic attributes). -- 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