DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40913>.
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=40913

           Summary: JasperException raised against valid attribute
           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: [EMAIL PROTECTED]


In org.apache.jasper.compiler.Validator.checkXmlAttributes(), the validation 
for deferred values and methods is raising an exception when an rtexprvalue 
attribute is legitimate.

------Stacktrace------
org.apache.jasper.JasperException: 
org.apache.jasper.JasperException: /index.jsp(83,0)
      According to TLD or attribute directive in tag file, attribute items 
does not accept any expressions
    org.apache.jasper.servlet.JspServletWrapper.handleJspException
(JspServletWrapper.java:565)
    org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:354)
    org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
    org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:803)



------relevant code in checkXmlAttributes()------
 if (!deferred && (tldAttrs[j].isDeferredMethod() || tldAttrs
[j].isDeferredValue())) {
     // Only deferred expressions are allowed for this attribute
     err.jspError(n, "jsp.error.attribute.custom.non_rt_with_expr",
             tldAttrs[j].getName());
 }

------testcase------
<c:forEach var="k" items="${colors}">
  <li><font color="${k}">This line is ${k}</font>.
</c:forEach>

The TLD for JSTL 1.2 says items can be an rtexprvalue and also a deferred-
value.  So the above usage is correct.
Attaching a testcase WAR.

------summary------
I don't think this code is really necessary; at least, it needs to be relaxed 
to allow tai.canBeRequestTime() values.

-- 
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to