tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric W Hauser <ehau...@indiana.edu>
Subject Re: how to ask length of collection in JSTL tags
Date Tue, 15 Jul 2003 15:27:54 GMT
Although the bean idea is a good workaround, that may not be the most
efficient way to do this for a large application with a large of
collections. Since object created is one of the most expensive tasks in
Java, it may be more efficient to come up with a different solution than
using a bean as a wrapper.

What I've done for my project is to set the collection size as an
attribute in the request or session, depending on the scope I need.  Of 
course, I'm still creating new objects when doing this (the String for
the attribute name, etc), but it is being stored in the either the
Request or Session objects.  Since this are already created, would this 
not be more efficient? I'm not sure if it is more efficient or not
because I'm not sure of the overhead involved in creating new request or
session variables.

-------------------
Eric Hauser
ehauser@indiana.edu
(317) 679-4766


---------------------------------------------------------------------
To unsubscribe, e-mail: taglibs-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: taglibs-user-help@jakarta.apache.org


Mime
View raw message