• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

regarding getting updated values in JSP on the fly

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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:
 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic