• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

doubt with res.sendRedirect

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
To support clients without redirect capability, HttpServletRsponse.sendRedirect() method writes a short response body that "
contains a hyperlink to the new location"

Is this valid, cos i dont see anything like this in the API, and "clients without redirect capability?" meaning browsers which dont support redirect??

Thanks,
Sangeetha
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


To support clients without redirect capability, HttpServletRsponse.sendRedirect() method writes a short response body that
"contains a hyperlink to the new location"

Is this valid, cos i dont see anything like this in the API, and "clients without redirect capability?" meaning browsers which dont support redirect??


I dont think it is correct.

sendRedirect() does let the client notice the redirection of Http request. It sends the signal to the browser and ask the browser to send another URL to access the needed resource.

In order to make redirection transparent to the client, you need to use RequestDispatcher.forward(). Please read the APIs for detals.

Nick
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic