Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • 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
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown

How to send html table data to a servlet/bean

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a table created using jsp. The table has three columns and will have as many rows as the user wants.The user fills data in the cells and submits it . I want to send the table data to the server for processing. I see that servlets can read data from html forms through some methods, but i dont see a way to read the data from all the cells in the table. How do i do this ?

Also i need to implement paging using "previous" and "next" buttons so that the first pages takes (say) 20 rows ,and so on , till the user finishes. I want to know if i should send the table data page by page to the server , or i can store the data temporarily in the client till the user finishes and send all the pages together to the server.

This is my first web application . So please redirect me to any place which already explains these ,incase one exists. I have done considerable search though.

Posts: 67425
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please do not ask more than one question per topic. It just creates a mess of overlapping replies.

For your first question: only form input elements get submitted to the server. This has nothing to do with Servlets or JSP, it's the way that HTML and HTTP work. If you want the data to be submitted, it must be in form input elements.

For your second question, see the JSP FAQ for info on paging datasets.
Pay attention! Tiny ad!
Thread Boost feature
    Bookmark Topic Watch Topic
  • New Topic