Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

regarding getting updated values in JSP on the fly

 
srinivas k
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
imagine we have details.jsp and update.jsp , firstly the details.jsp will display the values fetched from the database(im using arraylist to store the values fetched from database before they are being displayed on the display.jsp),
when we select a value , we will navigate to the update.jsp , in this jsp we will modify the selected data
and when we submit, the previous jsp(details.jsp) will be displayed but here the modified values are not being displayed until i refresh the page.
Let me know how i should overcome this problem, i should not go to the database again
Thanks in adv:
 
Srinivas Jag
Greenhorn
Posts: 9
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am assuming that there is a pop up page which is called from details.jsp which displays fields for editing.
If update.jsp is your process page,you can use javascript at the end of update.jsp as follows:
<script>
parent.window.opener.location.reload();
parent.window.close();
</script>
This will refresh your parent page, in this case details.jsp with the latest data and close the pop up page.
Regards,
Srini
[ August 29, 2003: Message edited by: Srinivas Jag ]
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64192
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Before resorting to symptomatically refreshing the page with Javascript, I'd search through this forum for 'cache' and 'caching' and add the code and directives to prevent your pages from caching in the first place.
And srinivas k, you'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it.
Thanks!
bear
JSP Bartender
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic