This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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 Murach's Java Servlets and JSP this week in the Servlets 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
Author

How to send html table data to a servlet/bean

maya varma
Greenhorn

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

Joined: Jan 10, 2002
Posts: 60774
    
  65

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] [Bear's FrontMan] [About Bear] [Books by Bear]
 
jQuery in Action, 2nd edition
 
subject: How to send html table data to a servlet/bean
 
Similar Threads
going nuts trying to reference images on server
Save POI Excel file in JSF
how to get num of rows in ResultSet
HTML Table as XML File using JavaScript
Split ResultSet