In my servlet, there is an attribute that I can check to see how many SSNs are submitted in the form. What I want to do is build som type of looping logic to cycle through these. In other words I want this effect:
So I want to avoid typing out each of the preceding lines because I can potentially have 30 SSNs submitted on the form. What's the cleanest way to do this?
Each of those getSsnX methods actually correspond to a form bean in Jakarta Struts. So this dynamic form could potentially have 30 text boxes on a screen that each have an Ssn in them. Not all the fields are required either. So even though 30 Ssns may be on the form, the user can choose to simply enter in 1 Ssn.
Joined: Sep 10, 2003
public String getAllSsn() in PersonForm could just call each of the getSsnx methods and return an array of all the Ssn's that were actually entered. Angel