Win a copy of Head First Android this week in the Android 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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

 
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just reload the list during the same request as you do the delete.
 
reply
    Bookmark Topic Watch Topic
  • New Topic