How to set a list from code?

I just started teaching myself JSTL and I really do not know what to search for, so I will just explain what I am trying to accomplish.

I have a class with static methods that retrieves objects from a pooled database connection and I simply want to iterate over the list using JSTL.

<c:set value="${param.url}" scope="page" var="url" />

<c:set value="what to put here?" var="urls" /> <!-- i want the variable urls to be populated by PersistencyManager.getURLs(url); -->

<c:forEach var="info" items="${urls}">...</c:forEach>

Any help is appreciated.

[790 byte] By [bbqfritoa] at [2007-11-27 8:46:53]
# 1

JSTL is not really a fully fledged programming language. It is intended to help display JSP pages, not really to process requests.

However I think in this case it should be possible. The class has static methods? Then you need to define an EL function which can use that static method.

Check out this link: http://faq.javaranch.com/view?DefineELFunctions

Cheers,

evnafets

evnafetsa at 2007-7-12 20:50:26 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...