Re: Obtaining size of java.util.Collection through Struts/JSTL
Greg Pelly wrote: What is the prefered way to obtain the size of elements that implement the Collection interface, such as a Vector? I would like something like: elements exist in this Vector! But since the method is called "size()" and not "getSize()," Struts can't handle it. Right now I am using scriptlets: <% java.util.Vector v = request.getAttribute("myVector"); %> ...and later... <%= v.size() %> elements exist in this Vector! Any advice? Greg Source: http://raibledesigns.com/page/rd?anchor=struts_tip_o_the_day Matt - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Obtaining size of java.util.Collection through Struts/JSTL
Make sure you include: <%@ taglib uri="http://java.sun.com/jsp/jstl/functions"; prefix="fn" %> /robert Greg Pelly wrote: What is the prefered way to obtain the size of elements that implement the Collection interface, such as a Vector? I would like something like: elements exist in this Vector! But since the method is called "size()" and not "getSize()," Struts can't handle it. Right now I am using scriptlets: <% java.util.Vector v = request.getAttribute("myVector"); %> ...and later... <%= v.size() %> elements exist in this Vector! Any advice? Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Obtaining size of java.util.Collection through Struts/JSTL
I use bean:size. I don't know if there is a JSTL equivalent. Seems odd that there wouldn't be one, but I can't find one in my JSTL reference. Erik Greg Pelly wrote: What is the prefered way to obtain the size of elements that implement the Collection interface, such as a Vector? I would like something like: elements exist in this Vector! But since the method is called "size()" and not "getSize()," Struts can't handle it. Right now I am using scriptlets: <% java.util.Vector v = request.getAttribute("myVector"); %> ...and later... <%= v.size() %> elements exist in this Vector! Any advice? Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Obtaining size of java.util.Collection through Struts/JSTL
What is the prefered way to obtain the size of elements that implement the Collection interface, such as a Vector? I would like something like: elements exist in this Vector! But since the method is called "size()" and not "getSize()," Struts can't handle it. Right now I am using scriptlets: <% java.util.Vector v = request.getAttribute("myVector"); %> ...and later... <%= v.size() %> elements exist in this Vector! Any advice? Greg - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]