File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to update record in jsp

 
Sudhir Pawar
Greenhorn
Posts: 25
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Below i have given my code in jsp which successfully retrieving values from oracle database based on form no. and showing into respective fields.
But now when i edit any value on this form and click on verify button to update edited values in database it updating successfully but not showing quickly after click on verify button it require either go back and come again on this form or click on refresh button in browser then it showing updated values.
So how can i update and shows values quickly.




 
Albareto McKenzie
Ranch Hand
Posts: 299
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think this topic is going to cause Bear Bibeault a heart attack.

First things first, you should not use Java code in JSPs, but even worst you should never access databases from a JSP, it is just wrong! I think it is a good idea to read a bit about MVC and Expression Language and beans and... well, a big bunch of things related on how to make a web application in Java.

But going back to your question, if you want to refresh elements in your page without refreshing the full page what you need is AJAX. Of course to use AJAX you must have your logic in the Server and not in the JSP itself.

Good luck!
 
J. Kevin Robbins
Bartender
Pie
Posts: 1605
15
Chrome Firefox Browser jQuery Linux MySQL Database Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If Bear survives your 680+ line example, he'll be along soon with links to several articles you need to read, because you are seriously headed down the wrong path.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64171
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As predicted, here are the links:
  • The Secret Life of JSPs
  • The Front Man


  • Hope they help!
     
    Consider Paul's rocket mass heater.
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic