Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Arrays in JSP

843833Aug 30 2001 — edited Aug 31 2001
I 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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 28 2001
Added on Aug 30 2001
8 comments
965 views