File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes How to send html table data to a servlet/bean Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to send html table data to a servlet/bean" Watch "How to send html table data to a servlet/bean" New topic

How to send html table data to a servlet/bean

maya varma

Joined: Jan 25, 2011
Posts: 1
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

Joined: Jan 10, 2002
Posts: 63873

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.

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: How to send html table data to a servlet/bean
It's not a secret anymore!