• Post Reply Bookmark Topic Watch Topic
  • New Topic

Caching Issue: How to force HTML/JSP to refresh?  RSS feed

 
Alex Draganski
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm iterating through Array list and display contents using JSP. Each row has a "delete" link next to it and the user can click on that link to delete the corresponding record from the database. After the record has been deleted, the JSP gets the updated list from the backend and iterate through it to display the updated records.

The problem is that after the deletion is done, the JSP page doesn't refresh and the deleted record shows until I click on "refresh" button. How can I force the HTML/JSP to display the updated list?

I used the following fragment but it didn't help:

<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache">
<META HTTP-EQUIV="Expires" CONTENT="-1">

The server is Tomcat 5.5 if that makes a difference.

Thanks in advance!
 
Bauke Scholtz
Ranch Hand
Posts: 2458
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just reload the list during the same request as you do the delete.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!