This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

what is requestDispatcher

 
Dharmender Singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is the difference b/w sendRedirect and requestDispatcher

 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
a request dispatcher implements the RequestDispatcher interface, which contains methods to dispatch a request. Methods like sendRedirect, forward... Check it at http://java.sun.com/j2ee/1.4/docs/api/javax/servlet/RequestDispatcher.html
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dharmender Singh,
Welcome to JavaRanch!

In an effort to help you get the most from our forums, we've compiled a
list of tips for asking questions here. You can find the list in our
FAQ section here.
In particular please see:
UseRealWords

Abbreviations such as "u" or "ur" in
place of "you" and "you are" or "you're" confound language translation software making
it hard for our non-English speaking members to read your posts.


Again, welcome to JavaRanch and good luck with your question.
-Ben
 
Dharmender Singh
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in send redirect the new response object will be sent but in forward coming req res objects will be forwarded
 
Rahul Bhattacharjee
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no need to post the same message twice.In case you have done os , you can delete one of the messages.

sendRedirect works on the client side.The server sends the browser the URL to which it needs to connect.The browser then makes a fresh connection with the URL.

RequestDispatcher works on the server side.Look for servlet documentation for more information.

Try searching javaranch .This questions has been asked quite a few times before too.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic