• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Liutauras Vilda
  • Knute Snortum
  • Bear Bibeault
  • Devaka Cooray
  • Jeanne Boyarsky
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • salvin francis
  • Tim Holloway
  • Piet Souris
  • Frits Walraven

form updating using jsp

Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using jsp tag libraries to fetch data(11 columns) from a table and display in editable format(50 records per page) to the user. I have completed till this. Now, the user can modify any of the contents displayed on the page. After modifying the contents, he can hit save button to insert all the data on the screen to a new table.

I am confused how to read this 50 records form data using servlets or jsp.
Please help.
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kalai,
As you're using a loop in your jsp page to create each record, and you're creating 50 records, so you have in your generated html page
for example (50 field with the name "employeeName", 50 field with the name "ID", ....), right?
so when you want to retrieve the values of those fields all you'll get is the last value set only..
so in order to trick this do this:
1- In your jsp page and while naming your fields write it like that:

now you have numbered fields in your generated html page:
-For record 1 --> employeeName1, ID1, ....
-For record 2 --> employeeName2, ID2, ....

2- In your servlet that is supposed to save those records just let it do the next:

and that's it..
I've done it before and it worked for me,
for more details just inform me please..
Always look on the bright side of life. At least this ad is really tiny:
Java file APIs (DOC, XLS, PDF, and many more)
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!