Total members 9952 | Gratitudes |It is currently Sat Feb 11, 2012 2:42 pm Login / Join Codemiles


All times are UTC [ DST ]




Post new topic Reply to topic  Quick reply  [ 2 posts ] 
Author Question
 Question subject: Difference between forward and sendRedirect
PostPosted: Fri Nov 07, 2008 12:50 pm 
Offline
Newbie
User avatar

Joined: Wed Mar 28, 2007 7:31 pm
Posts: 14
Has thanked: 0 time
Have thanks: 0 time

Q: Difference between forward and sendRedirect?


A: When you invoke a forward request, the request is sent to another resource on the server, without the client being informed that a different resource is going to process the request. This process occurs completly with in the web container. When a sendRedirtect method is invoked, it causes the web container to return to the browser indicating that a new URL should be requested. Because the browser issues a completly new request any object that are stored as request attributes before the redirect occurs will be lost. This extra round trip a redirect is slower than forward.

_________________
best for you
yours, Mahmoud
http://www.templatesdragon.com


TOP
 Profile Send private message  
Reply with quote  
 Question subject: Re: Difference between forward and sendRedirect
PostPosted: Sat Jul 25, 2009 1:44 pm 
Offline
Newbie
User avatar

Joined: Wed Apr 15, 2009 7:18 am
Posts: 32
Has thanked: 0 time
Have thanks: 0 time
forward runs on the server side while sendRedirect runs on the client as well as on the server side thats why the response generated by sendRedirect() is slow as compared to rd.forward().By using sendRedirect() you can forward the request to any web application either in the same server or to the another one.Incase of forward() the request has to be forwarded to the same web application.One more difference is that forward() method holds the previous request and response objects while using sendRedirect(),it will create fresh request and response objects

_________________
MySpace Layouts


TOP
 Profile Send private message  
Reply with quote  
Post new topic Reply to topic Quick reply  [ 2 posts ] 
Quick reply


  


 Similar topics
 Topic title   Forum   Author   Comments 
 difference between upcasting and downcasting  Java  Anonymous  1
 find the difference between dates in asp.net  ASP/ASP.net examples  msi_333  0
 Looking forward to getting newest 70-294 exam  General Discussion  Delia  0
 Difference between PHP echo() and PHP print()?  PHP  Mario2027  2
 USB programming back and forward button  General Discussion  luke89  2

All times are UTC [ DST ]


Users browsing similar posts

Users browsing this forum: No registered users and 2 guests



Jump to:  
Previous Question | Next Question 




Home
General Talks
Finished Projects
Code Library
Games
Tutorials

Java
C/C++
C-sharp
php
Script
JSP/Servlets
Ajax
ASP/ASP.net
Google SEO
Database
Communications
Phpbb3 styles
Photoshop tutorials
Flash tutorials
Find a job






Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team