How to send html table data to the server (java/j2ee) -


i creating web application using java/j2ee on windows using netbeans/glassfish , sqlite database.

i creating table using jsp. table has 3 columns , have many rows user wants.the user fills data in cells , submits . data needs send server processing. see servlets can read data html forms through methods, don't see way read data cells in table. how do ?

also need implement paging using "previous" , "next" buttons first page takes 20 rows(say) ,and on , till user finishes. want know if should send table data page page server, or can store data temporarily in client till user finishes , send pages server. think not idea burden client ,if user enters huge number of rows.

this first web application, please redirect me place explains these, in case 1 exists. have done considerable search though.

although can use of lots available web framework i'd recommend else. said first web app, expected relatively simple. so, can stand without framework. should learn core, should stand without framework.

you can create jsp page generates writable table. should combine tags <table> , <input>. each intput tag should have attribute name. inputs in same column have same name.

for example if table contains 2 columns: car_model , car_manufacturer , 2 lines:

megane renault 323    mazda 

the table following:

this table form submit stuff servlet using http post. not problem several parameters of same name. servlet api allows this: request.getparameters("car_manufacturer") returns array of strings contain in our case renault , mazda.

implementation of links previous , next not complicated. data have implement paging anyway. store index of first visible element in collection retrieve db , number of elements show. jsp should take these elements, perform sql query , show relevant elements. better solution modify query dynamically retrieve relevant elements.

i hope answer helps. not contain exact todo list believe contains enough tips start from. luck , have fun.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -