jsp: access multi people information

Q

Quick Function

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
 
A

Andrew Thompson

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?.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top