Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Doubt on sendRedirect()

 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sendRedirect("/foo/stuff.html")

"The forward slash at the begining means root of this web-app".

Is it correct?can anyone explain?

Thanks....
 
Bharat Roy
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Either provide the full URL or remove the / from the beginning.
 
MInu
Ranch Hand
Posts: 517
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the answer from HFSJ errata list.(http://www.oreilly.com/catalog/headservletsjsp/errata/headservletsjsp.confirmed)
It says
"The forward slash at the beginning means "relative to the root of the web container."

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic