Arrays in JSP
843833Aug 30 2001 — edited Aug 31 2001I have a bean something like this;
public class FormBean
{
String [] languages;
public FormBean()
{
}
// getters and setters for "languages"
}
Note that nowhere I have specified what should be the capacity of the array should be. Now I use a jsp page which puts some of the form properties in this array, but the number of form elements that goes into this array is dynamic i.e. depends on the user. I am using the following tag for setting the bean properties:
<jsp:setProperty name="formBean" property="*"/>
Now I see that the jsp page is dynamically increasing decreasing the array based on the user input. How this is possible?? I thought arrays are suppoed to be static?
Please advice if I am doing/thinking something wrong here...
tx
-AB