jsp: access multi people information

Discussion in 'Java' started by Quick Function, Jul 22, 2004.

  1. I am writing jsp. The first page asks user to input the number of
    children he has and then goes to page 2. In page 2, the user is asked
    to input name and address for each child. In page3, I want to go
    through each children and do something.

    In page 1, I got the number of children and send the information to
    page 2.

    In page 2, I have a table like this:

    <form action="page3.jsp">
    <table>
    <c:forEach start="0" end="${param.number_of_children}" var="index">
    <tr>Name <input type="text" name="n${index}">, Address <input
    type="text" name="a${index}"></tr>
    </c:forEach>
    </table>
    <input type="sumbit">
    </form>

    In page3, I have:

    <c:forEach start="0" end="${param.number_of_children}" var="index">
    <c:eek:ut value="${param.n${index}}"/>
    <c:eek:ut value="${param.a${index}}"/>
    </c:forEach>

    But looks like the "${param.n${index}}" does not work. How can I
    access to the information about each child? Is the whole a approach a
    good one or there is a better approach?

    Thanks,

    qq
     
    Quick Function, Jul 22, 2004
    #1
    1. Advertising

  2. Quick Function

    Roedy Green Guest

    On 21 Jul 2004 20:04:57 -0700, (Quick Function)
    wrote or quoted :

    ><input type="sumbit">


    surely you mean "submit". Best to cut and paste your exact code.

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Jul 22, 2004
    #2
    1. Advertising

  3. On Thu, 22 Jul 2004 03:17:35 GMT, Roedy Green wrote:

    > On 21 Jul 2004 20:04:57 -0700, (Quick Function)
    > wrote or quoted :
    >
    >><input type="sumbit">

    >
    > surely you mean "submit". Best to cut and paste your exact code.


    Or URL..
    <http://mindprod.com/jgloss/myjavaserver.html>

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Jul 22, 2004
    #3
  4. Quick Function

    Roedy Green Guest

    On Thu, 22 Jul 2004 04:50:07 GMT, Andrew Thompson
    <> wrote or quoted :

    >> surely you mean "submit". Best to cut and paste your exact code.

    >
    >Or URL..
    ><http://mindprod.com/jgloss/myjavaserver.html>


    I am puzzled what you meant. Were you just using that as an example
    of an URL or was there some deeper significance?

    --
    Canadian Mind Products, Roedy Green.
    Coaching, problem solving, economical contract programming.
    See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
     
    Roedy Green, Jul 22, 2004
    #4
  5. On Thu, 22 Jul 2004 06:31:51 GMT, Roedy Green wrote:
    > On Thu, 22 Jul 2004 04:50:07 GMT, Andrew Thompson
    > <> wrote or quoted :
    >
    >>> surely you mean "submit". Best to cut and paste your exact code.

    >>
    >>Or URL..
    >><http://mindprod.com/jgloss/myjavaserver.html>

    >
    > I am puzzled what you meant.


    I am not surprised. I read the post after
    it was sent and realized my message was any
    but clear.

    >..Were you just using that as an example
    > of an URL


    No.

    >..or was there some deeper significance?


    The OP was discussing JSP's.

    I have recently been thinking/talking a lot
    of free host's (to post examples of Applet's/
    HTML/CSS/Servlets & JSP), and the only host I
    know that will allow the OP to post an example
    URL of his mis-behaving .JSP form is ..MyJavaServer.

    So, I suppose not *very* deep,
    but deeper than, 'huh?.

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, Jul 22, 2004
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    4,419
  2. Replies:
    2
    Views:
    518
  3. Replies:
    1
    Views:
    726
    Roger Lindsjö
    Jun 11, 2008
  4. c676228
    Replies:
    3
    Views:
    114
    ChigbuaUmuenu
    Oct 7, 2006
  5. c676228
    Replies:
    4
    Views:
    121
    c676228
    Oct 19, 2006
Loading...

Share This Page