I have an arraylist
that is declared and populated in a JSP
file:
<% for(int i=0; i< GDI.getRow(); i++){
associatedLines[i] = GDI.getRow().get(i).getNumplanindex;
}
ArrayList<Integer> availableLines = new ArrayList<Integer>();
for(int i=0; i<associatedLines.length; i++){
if(associatedLines[i] == null){
availableLines.add(i);
}
}
%>
I would like to use the contents of availableLines in the dropdown list and be able to store the value selected to be used somewhere else.
I am almost certain that I need to use JSTL
but I am not sure how to do it.
Hopefully somebody can help. Thanks!