• Post Reply Bookmark Topic Watch Topic
  • New Topic

Inserting into DB when last page loaded

 
shriganesh kakade
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have done it but now one problem is that the values are automatically inserted in the database when the last page is loaded.
The last page includes the buttons, from that buttons after clicking Save button, the values should be inserted.
So i defined one html function to call the method for inserting the data and called that html function on the Onclick event of the button.
I can't understand what may be problem..
 
Prashant Chindhade
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually what problem do you have ...?? I am unable to understand it.
 
shriganesh kakade
Greenhorn
Posts: 23
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to insert the data from multiple jsp pages into the database.
So i had used the java beans to retain the values.
Now i want to insert the data when the last jsp page's Save button is clicked.
So i wrote the insert query in one method from another class.
And that method is called in that last jsp page.
But the problem is that when that last page is loaded, immediately all the data is inserted into the database, before clicking the Save button..
 
shruthi vijayakumar
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please update the code whatever you have written..
 
Nicola Garofalo
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shriganesh kakade wrote:I want to insert the data from multiple jsp pages into the database.
So i had used the java beans to retain the values.
Now i want to insert the data when the last jsp page's Save button is clicked.
So i wrote the insert query in one method from another class.
And that method is called in that last jsp page.
But the problem is that when that last page is loaded, immediately all the data is inserted into the database, before clicking the Save button..


Could you please post the code of the last jsp page?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!