• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

sendredirect

 
amarkirt saroay
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can a sendRedirect be used to redirect to a servlet path? like "/selectme.do" ? or is it only valid for jsp and htmls?
 
sujith Acharya
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sendRedirect is not limited to jsp or html. sendRedirect means you are creating new request to get something from server. so it can also be request for servlet
 
Andriy Pererva
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moreover, sendRedirect is not limited by the application or even web-container's boundaries, because it actually forces the client (browser) execute this redirect. So you can specify the whatever URL you want. For example:
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic