Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to send html table data to a servlet/bean

 
maya varma
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
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.

 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic