A question for experienced JSP/bean developers:

It seems to me that a common task in a JSP is to output a list of some sort
where the contents and length of the list are variable and obtained from a
bean (for example, when creating a pull-down menu of dynamic options). And
from what I've read, there's no automatic way to do that (by automatic
I mean something akin to "jsp:getProperty"). So it has to be programmed,
having the bean return an array or an Enumeration (etc.), and then using
a scriplet to loop through the elements.

But for the same reasons that "jsp:getProperty" is preferred over using
an expression tag to access the bean's "get" method directly, I would
think that there'd be something similar for looping through dynamic lists.

Have I missed something? If not, is there a prevailing opinion on whether
using an array or an Enumeration is better, in general? Or does it just
come down to the usual "depends on the situation"?

--Jim Preston

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to