File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes regarding getting updated values in JSP on the fly Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "regarding getting updated values in JSP on the fly" Watch "regarding getting updated values in JSP on the fly" New topic

regarding getting updated values in JSP on the fly

srinivas k

Joined: Jan 31, 2003
Posts: 17
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

Joined: Jun 30, 2003
Posts: 9
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:
This will refresh your parent page, in this case details.jsp with the latest data and close the pop up page.
[ August 29, 2003: Message edited by: Srinivas Jag ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63844

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.
JSP Bartender

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: regarding getting updated values in JSP on the fly
It's not a secret anymore!