wood burning stoves 2.0*
The moose likes JSP and the fly likes back and reload Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "back and reload" Watch "back and reload" New topic
Author

back and reload

Sangeetha Rao
Ranch Hand

Joined: Aug 01, 2005
Posts: 33
I have a page PAGE1.jsp that has a table of names from the database. The page also has a text box in which the user can enter a name and submit. Once the user submits, the flow goes to a servlet that inserts the data in the database table and gets forwarded to a confirm.jsp page that displayes a confirmation message.

I want a link/button on confirm.jsp that takes me back to PAGE1.jsp which has the latest set of names. i.e I want a back and reload functionlity. How do I do that?

history.go(-1) and history.back() just go back to PAGE1.jsp but they dont refresh the page. I have to manually refresh to get the latest data in that table. How can this be prevented?
Pankaj Patel
Ranch Hand

Joined: Jul 13, 2006
Posts: 73
Hi. Instead Of using history.back() or history.go(-1), Put a link to page1.jsp, or refresh that confirm.jsp page after few seconds and in refresh meta tag give url of page1.
Sangeetha Rao
Ranch Hand

Joined: Aug 01, 2005
Posts: 33
I cannot hard code the link to page1.jsp in confirm.jsp because confirm.jsp is a common page used by many pages to display a confirmation information.

Is there a way to get the URL of page1.jsp at runtime?
 
 
subject: back and reload
 
Similar Threads
Passing data from jsp to jsp to servlets to jsp (OR) NOT to process user's req again
window without menu bar ...
Refresh jsp page
redirecting page
Using a Dynamic Table on My JSP