You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/08/15 21:17:48 UTC
DO NOT REPLY [Bug 11742] New: -
jsp:attribute with a non string body
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11742>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11742
jsp:attribute with a non string body
Summary: jsp:attribute with a non string body
Product: Tomcat 5
Version: Nightly Build
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: Jasper2
AssignedTo: tomcat-dev@jakarta.apache.org
ReportedBy: prasad.subramanian@sun.com
If we have a tag that has an attribute that accepts non -string objects as
values,using <jsp:attribute> to supply values to the attribute throws an
exception. This is a complie time error , this happens because the body of the
jsp:attribute is evaluated ansd converted to a string and then assigned to the
setter method of the tag handler which in turn takes in a argument of type other
than string.
The body of the jsp:attribute contains a expression.
Here is the JSP:
<!-- This JSP tests the use of jsp:attribute and jsp:body with a Custom tag
implementing body support -->
<%@taglib uri="/WEB-INF/JSPAttTL.tld" prefix="att" %>
<%@page import="java.util.*" %>
<jsp:useBean id="depts" class="tlitertag.OrgList" />
<att:list name="dept" >
<jsp:attribute>
${depts.organization}
</jsp:attribute>
<jsp:body>
<%=pageContext.getAttribute("dept") %>
</jsp:body>
</att:list>
========
Here entity accepts a value of type java.util.ArrayList and organization is a
property of type ArrayList
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>