• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

back and reload

 
Sangeetha Rao
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic