| Author |
what is requestDispatcher
|
Dharmender Singh
Greenhorn
Joined: Jun 14, 2007
Posts: 16
|
|
what is the difference b/w sendRedirect and requestDispatcher
|
 |
Christophe Verré
Sheriff
Joined: Nov 24, 2005
Posts: 14685
|
|
|
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
|
[My Blog]
All roads lead to JavaRanch
|
 |
Ben Souther
Sheriff
Joined: Dec 11, 2004
Posts: 13410
|
|
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
|
Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
|
 |
Dharmender Singh
Greenhorn
Joined: Jun 14, 2007
Posts: 16
|
|
|
in send redirect the new response object will be sent but in forward coming req res objects will be forwarded
|
 |
Rahul Bhattacharjee
Ranch Hand
Joined: Nov 29, 2005
Posts: 2300
|
|
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.
|
Rahul Bhattacharjee
LinkedIn - Blog
|
 |
 |
|
|
subject: what is requestDispatcher
|
|
|