Win a copy of Practical SVG this week in the HTML/CSS/JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

very very urgent... read data from jsp table.

 
satya kiran
Ranch Hand
Posts: 52
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I am facing a problem in project. I am getting the data from a database table and it is displayed in a jsp page (html table). User is allowed to make modifications in the table cells and clicks a update button, It has to be updated in the database. How can i read the data from the jsp (html table) for the updation in the database.
Thanks in advance
kiran
 
Sandeep. Oza
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kiran,
It's very simple..
1) just submit a form to some process.jsp page....
2) get all your forms (tables) fields values on this page by using..... String custname=request.getParameter("cname"); where cname is the name of that field.
3) write a method with update quiry on your required database table to update columns.
4) fprward control from that page to your required page by using pageContext.forward("/abcpackage/abcmodule/abcform.jsp");
with a message on top that" Record is Updated Successfully"
Good Day.
Sandeep Oza
 
Ali Hassaan
Ranch Hand
Posts: 103
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simply place textboxes in a table where u r showing database fields and on next get those fields frm request.getParameter() function.
 
bijupk
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello,
I went through the reply an d would like to add a line to it. Always use a bean to connect any datafrom the JSP to Database , it is a better and easier practice. try it, you will effieciently use JSP then only.
thank you and all the best
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!