• 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
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • salvin francis
  • fred rosenberger

Difference between sendRedirect and Refresh

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am not sure about this:
What is the difference between using a sendRedirect method of the Response object and sending a "Refresh" header with a refresh time of 0?
Do they have the same effect?
Also, how come the "Refresh" header is not in the HTTP 1.1 specification?
Thank you very much.
 
ranger
Posts: 17346
11
Mac IntelliJ IDE Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unfamiliar with refresh, but I would assume that would refresh the same "Page", whereas sendRedirect sends the client to a different "Page"
for instance the client requested ServletA, when you refresh you get ServletA again, whereas sendRedirect would send the client to ServletB.
Mark
 
If a regular clown is funny, then a larger clown would be funnier. Math. Verified by this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
https://www.kickstarter.com/projects/paulwheaton/greenhouse-1
    Bookmark Topic Watch Topic
  • New Topic