Updation problem
How do i update multiple rows in jsp
This is my JSP code:-
<jsp:useBean id="bookingController" class="bl.Traf" />
<% long id=Long.parseLong(request.getParameter("tpid"));
Enumeration params =request.getParameterNames();
while (params.hasMoreElements())
{
//get the next parameter name
String paramName=(String) params.nextElement();
//If there are multiple values then use getParameterValues()
String paramValues[]=request.getParameterValues(paramName);
?
}
%>
The tpid is a hidden value which i'm getting from the main JSP page.
There are 5 fields named Comments,Status,ftno,ticketno,airwaysName which i want to update in all the rows and then pass all the values to this code which is shown above
What to do next?.
Plz help...
[851 byte] By [
vishala] at [2007-10-2 8:34:07]

The fact noone answers your problem should have you think about how you asked it.
What exactly do you wont ? You say you need to update, fine then I excpet you have either some EJB's or some JDBC you are planning to do but nothing is mentioned in your question nor in your source.
In your code we see you loop over all your request parameters, are you trying to write some generic framework that reads all parameters and then does some updates with it ?
Give the forum a more specific answer and then we can really try to help you, is your problem more a very general , I dont have a clue what to do problem then start by reading tutorials on servlets, JDBC, ....
String [] comments = request.getParameterValues("comment");
String [] status= request.getParameterValues("status");
String [] ftno= request.getParameterValues("ftno");
...
for (int i=0;i<comments.length;i++)
{
doYourSqlCode(comments[i],status[i],ftno[i],....);
}
For your JSP it doe not matter whatsoever if the field was hidden or not just treat them all the same.
WHat exaclty do you want the tpid to do ?>