Maneesh Godbole wrote:Check out Jasper Reports and BIRT.
Moving to a more appropriate forum.
Shail Narkhede wrote:Nitin,
Generally this type of thing is done by considering primary key of perticular table.
While calling any updation or creation method, first we have to check that primary key,
if it is empty then call creation method and
if that key is non-empty then call updation method.
that means when you are getting the data from that table in bean you should get primary key,if you update some data & click on save than due to that primary key updation method is getting called.primary key you can populate in JSP by using hidden form feild.
Mohamed Inayath wrote:Nitin,
Q) How can i pass value of check box from same jsp page to another servlet where i can update my record ,
Update: you to have all the values from the screen along with checkbox value to the UpdateServlet.
(Similar way you have done in Delete Servlet).
Q) How can i had two submit button on same page OR how to submit checkbox value without using submit button to servlet
Yes you can have two Submit Buttons.
Create a hidden parameter say userSelect within the form.
Set the value for userSelect when the user selects either Delete/Update.
The JSP page code is fetching the record from database and displaying them in table, from where i can either delete the record or update them on the basic of checkbox.
Delete is working fine as i had define input type submit and form action as delete servlet.
But how can i update the record, on click of a button i want to pass empid to my servlet where i can call my update method defined in controller servlet.
Q) how does hidden parameter will work
Without submit button; tell me at what user event you want to pass the values of the screen to servlet.