• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Himai Minh

form updating using jsp

Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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..
You didn't tell me he was so big. Unlike this tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
    Bookmark Topic Watch Topic
  • New Topic