|
-
November 29th, 2004, 09:58 AM
#1
ArrayList generation in JSP
Hi,
I have a jsp page where I want to enter the grades of a student.
Now I am populating the student field from an arrayList retrieved from a servlet (this part is working fine !)
However, I am not sure how I collect all the graded (input from user) into an ArrayList and pass it to a servlet !
<input type="text" name="grade" size="10" maxlength="30">
doing this would return a 1 string I want to get the "grades" as an ArrayList
thanx,
Samik
-
November 30th, 2004, 12:12 PM
#2
Re: ArrayList generation in JSP
Hi Samik
I'm not a JSP man, more ASP but i would do it like this
If you want to enter all the grades at once you could enter a comma delimited string ie strGrades="A,B,C,D,E"
when you receive the string from your form post in ASP you can split the string into an array
arrGrades=split(strGrades, ",")
this would leave
arrGrades[0]="A"
arrGrades[1]="B"
arrGrades[2]="C"
etc
Any help?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|