Updating rows in jsp

In my jsp form there are multiple rows and fields.

Each row has a unique id . Now I will update ,for example ,Field2 from row 1, Field4 from row 2 and insert new values at one time

Travel FromTravel ToDate of TravelMode of Travel

1 LANy21/05/05road

2 NewJerseySeattle26/05/2005 Airways

How do I pass these updated multiple values one row at a time to the database. Which method to use.?

Plz Help.

[441 byte] By [vishala] at [2007-10-2 8:30:48]
# 1

hi

ur prblm is not very clear to me....... but as far as i understand is u can do..............

if r having only one submit(Update) button then use hidden type to pass the row no. or unique_id , on the basis of which u can update..........

u can get all these forms value using request.getParameter().......

pls discuss ur problem in detail... ur havind link or button corresponding to each row or not?

java_usera at 2007-7-16 22:31:44 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Hey thanks for ur reply.

I'm using only one update button and using a hidden row id .

Here is my problem in detail:-

1> In travelplan.jsp Iam updating the rows.

2> These values will go to the controller.jsp which will convert the hidden id to integer.

3> The controller will then call a java class which is connected to the database.

I dont know how to get the form values using request.getParameterValues(), and how to update using the hidden id.

Plz help me solve the problem if u have a example .

I'll be grateful to u .

vishala at 2007-7-16 22:31:44 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...