Forums Register Login

jsp update error

+Pie Number of slices to send: Send
Hello Sir!! Please help!!
I have a code in jsp in which I have update button with each row of sql table. But only the first row gets updated and the rest update buttons donot work. I don't know what's going wrong?
+Pie Number of slices to send: Send
It is because there are multiple textboxes with same name "ENO". It should have unique values for name attribute in your case.
When request.getParameter("ENO") is called, it returns the value of the first element in the FORM with name ENO, which is the 1st row in your FORM.

NOTE: Never ever write Java code in a JSP. This is very bad practice.
+Pie Number of slices to send: Send
You shouldn't be doing database work in the JSP.
The values to display should be passed in, from your servlet.

That said, what does the HTML produced by this look like?
It's the HTML in the browser that is not working, so that's where you should be looking.
+Pie Number of slices to send: Send
Hello, and welcome to the Ranch!

When posting code it is encouraged that you UseCodeTags (<- click) to make your code easy to read. I've added them for you this time, see how much better it looks!
Skool. Stay in. Smartness. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com


reply
reply
This thread has been viewed 712 times.
Similar Threads
data not editing in database
JSP java bean
can't get the local variable value in the value attribute of <input> tag
Getting null values in database while edit.jsp
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 00:25:21.