aspose file tools*
The moose likes JSP and the fly likes Refresher Database Value Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "Refresher Database Value" Watch "Refresher Database Value" New topic
Author

Refresher Database Value

ratan lal
Greenhorn

Joined: May 28, 2009
Posts: 12
Actually i designed a page in jsp that show all the user that are registered but not activated by admin. This page show name of inactivated user & activate button with each user name . When i click on activate button a java script function call that execute another jsp page, in which write code for activate that user. when status of activation is updated in database i wrote response.sendRedirect() for calling previvous page where it show my user name and active button. But problem is that it still show that user name in page which i just activated . I think that is due to not refresh data which i just update before send redirect .i am using MS-Access Database .
Please tell me what should i do. Thank in advance

suchit pandya
Ranch Hand

Joined: Oct 27, 2009
Posts: 43
Referesh the parent window. write a finction on onload of JSP which refresh the parent data. Call the same code when your parent page opens first time after displaying the message for user activated.
ratan lal
Greenhorn

Joined: May 28, 2009
Posts: 12
Thanks for your quick response but i have still confussion with your onload word. Is Page Onload means jspInit method.
suchit pandya
Ranch Hand

Joined: Oct 27, 2009
Posts: 43


in JSP body you can call function on body onload. Means when ever your jsp will load at that time that function will be called. So when you display the message user is activated on that JSP you write a code to reload the parent JSP(JSP which displays inactive users).
ratan lal
Greenhorn

Joined: May 28, 2009
Posts: 12
Thank Sir Once again, i will try to use it , if there will be any confussion related to that i will call you.

And one
suchit pandya
Ranch Hand

Joined: Oct 27, 2009
Posts: 43
Wel Come anytime. And dont call sir man just suchit... i am not that much older I passed my B.E just before a year only.

ratan lal
Greenhorn

Joined: May 28, 2009
Posts: 12
Sorry, from now i will call you suchit
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Refresher Database Value