• 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:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

jsp:forward and refresh  RSS feed

 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I use the jsp forward tag, the destination page is not refreshed i.e it is not loaded from the server. Instead it is loaded from cache? I then have to press F5 to get the page from the server. What can I do to stop this in my jsps?
Thanks
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Have you tried using no-cache META tags in the page that is being forwarded to? There is a similar jsp tag that controls caching, but this is a very old issue, and many people report various levels of success.
 
ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot Mike. I will investigate this.
 
ernest fakudze
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I solved the problem by using response.sendRedirect("pageName.jsp"). This will actually re-load the destination page from the server and then display it. The jsp forward tag does not reload the page from the server, all it does is to display it. It does not change the address in the address box.
 
Ranch Hand
Posts: 732
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sendRedirect doesnt reload the page from the server.
it says to the client's browser to change to that URL.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!