This week's book giveaway is in the Server-Side JavaScript and NodeJS forum.
We're giving away four copies of Micro Frontends in Action and have Michael Geers on-line!
See this thread for details.
Win a copy of Micro Frontends in Action this week in the Server-Side JavaScript and NodeJS 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
  • Liutauras Vilda
  • Paul Clapham
  • Bear Bibeault
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Jj Roberts
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • salvin francis
  • Scott Selikoff
  • fred rosenberger

How to solve refresh problem in JSP

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
When i am doing a DB update in JSP Application,
the fields updated in db is not shown in the jsp page when going to the same page after updating.Only after refreshing the page, the updated details are shown.Can anyone suggest me how this problem can be solved.
Thanks in Advance.
Yegappan.
 
Sheriff
Posts: 4313
Android IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try putting a bit of javascript at the top of the page that will cause the page to be refreshed each time it is visited. -- I'm not sure of the exact javascript code, but I'm sure you can post something in the javascript forum and someone will be able to give you an idea of how do it.
 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am also facing the same problem.If somebody comes out with some solution soon,would be helpful
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's easier than that. The problem is that your browser is caching the page. You simply have to include code in the JSP to turn off caching.
One solution (for HTTP 1.1 I believe) is to include < % response.addHeader("pragma", "No-Cache"); % > in your code.
Kyle
 
Ranch Hand
Posts: 1072
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
isn't this a place for mvc (push/pull )implementation ?
 
Squanch that. And squanch this tiny ad:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic