Forums Register Login

Multiple Values in JSP

+Pie Number of slices to send: Send
Hi,

How to give the multiple values for one variable in JSP??

Ex: If i have a variable called "Name" then i need to enter 100 names with one single variable called "Name". How to iterate this in JSP??

Please Help
Thanks.
+Pie Number of slices to send: Send
An array or List is the customary way to model multiple values.

Iteration in a JSP is accomplish with the JSTL <c:forEach> tag.
+Pie Number of slices to send: Send
P.S. scoped variable names should follow normal Java naming conventions, so starting a variable name with a capital letter, as in "Name", is not appropriate.
+Pie Number of slices to send: Send
Thanks Bear Bibeault

Could you give some example how to use JSTL <c:foreach> tag.
Did Steve tell you that? Fuh - Steve. Just look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 921 times.
Similar Threads
Sharing information between struts 2 variables and scriplets
JSP Use bean select option multiple
Passing Multiple Values to another jsp page from a List Box
jsp usebean question
Checkbox List
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 10:28:28.