Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

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

 
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!
 
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.
 
What's wrong? Where are you going? Stop! Read this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic