Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Want to know about sendRedirect() and forward() exactly  RSS feed

 
Vijaya Bhaskar
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am getting confusion with some explanation about sendRedirect() and forward().
Can anybody explain in detail about these two?


And I need one more,
When I ask a resource from a web client then that resource has to redirect to www.google.com automatically. How it is possible?
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
A redirect causes a response to be sent to the browser that tells the browser to send a new request for the redirected url.

A forward simply sends the current request to another servlet or a JSP in the web application. It is most often used to invoke a JSP from a page controller servlet.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!