Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is difference between Forward() and sendRedirect()
methode?

Answer Posted / venkat

forward() method send source prg to target web resource prg
in same web application.and use source and target web
resource prg are use same req,res objects so will use data
in target web resource prg.

rd.forward(req,res)

sendRedirect() method send source web resource prg to target
web resource prg in same webapplication or two different web
applications in same server or different servers.and this
method will not use same req,res objects so if you want to
send data source to target web resource prg use query
string.

r.sendRedirect("srv2"?a=10);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is called servlet mapping?

1148


What is the life cycle of a servlet?

1608


What are the steps that are involved in using the httpservlet class?

1180


Which method is called when reference variable is passed in system.net?

2450


Explain the difference between servlet and cgi?

1210


Which event is fired at the time of setting, getting or removing attribute from application scope?

1186


What do you mean by deployment descriptor?

1126


What is meant by session? Tell me something about httpsession class?

1080


What is cookie? Why is cookie used?

1101


What are some advantages of storing session state in cookies?

1078


What is servlet and how it works?

1040


What is http servlet?

1103


What are the objects involved when a servlet receives a call from client?

1089


What is the inter-servlet communication?

1220


When to use doget() and when dopost()?

1154