jsp:useBean and ArrayList
I'm having a conceptual problem with jsp:useBean and ArrayLists. The useBean element creates a JavaBean and allows you to set the values of the instance variables. If you create a bean that is an ArrayList:
<jsp:useBean id="myList" scope="session" class="java.util.ArrayList"/>
is there a way to initialize myList with another ArrayList? You can't use setProperty because the values stored in the ArrayList are not a "property" that can be set.
Should ArrayLists not be created with useBean for this reason? If not, should you just create a variable with:
<c:set var="myList" value="<%= getMyArrayList() %>"/>
Thanks in advance for your help...