CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2004
    Posts
    11

    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

  2. #2
    Join Date
    Nov 2004
    Posts
    13

    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
  •  





Click Here to Expand Forum to Full Width

Featured