• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to forward to other page

 
amit taneja
Ranch Hand
Posts: 813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

can any body pls tell me how to forward the request to other page
in servlets with request.getRequestDispatcher("http://www.yahoo.com");

this is not working ...i know ...it will take the relative path) but what if i wanted to forward the request to some website page or
wana execute PHP/ASP page script..
so i have to forward to that page..but how ???


thanx and regards,
amit
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
use sendRedirect() instead.
cheers.
 
amit taneja
Ranch Hand
Posts: 813
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanx ansari

:-)

regards,
amit
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 65664
129
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
amit, please post servlet questions such as this one in the Servlets forum. Moving thusly.
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!