Difference b/w redirecting a request and forwarding request, JAVA Programming

Both functions send you to a new resource like JSP, Servlet etc.

 

1680_Untitled.png

 

redirecting - sendR edir ect()

For w a rd

Gives a heade r back to the bro w ser,

w hich occupies the name of the resource to be redirected to. The bro w ser w i ll produce a fresh reques t from this hea d er infor m ati on . Have to provide absolute URL path .


For w a r d function t akes place w ithin the server w it ho ut the kno w ledge of the bro w ser. Accepts relative path to c ontext root or the servlet.

Has an ove r hea d of e x tra rem ot e trip but has th e advantage of being able to ref er to an y r esourc e on th e different or same domain and also gives b ook marking of th e page.

No ext r a net work trip.

Posted Date: 7/25/2012 3:58:31 AM | Location : United States







Related Discussions:- Difference b/w redirecting a request and forwarding request, Assignment Help, Ask Question on Difference b/w redirecting a request and forwarding request, Get Answer, Expert's Help, Difference b/w redirecting a request and forwarding request Discussions

Write discussion on Difference b/w redirecting a request and forwarding request
Your posts are moderated
Related Questions
Difference between URL instance and URL Connection instance? Ans) A URL instance shows the location of a resource, and a URL Connection instance shows a link for accessing or co

Application using Swing API

Create an object model for the Solar System using the following link: Provide">http://airandspace.si.edu/etp/ss/index.htm Provide an abstract class called Planet and a concrete s


Polymorphism - defines the ability of a single variable of a provided type to be used to reference objects of different types, and automatically call the method that is specific

Project Description: Develop an android service app that will run on the background. The app has to get the users location (longitude and latitude) every 5 minutes or when th

What are wrapper classes? Java gives specialized classes corresponding to every of the primitive data types. These are known as wrapper classes. They are example: Integer, C

a program to find the area under curve y=f(x) between x=a and x=b,integrate y=f(x) between the limits of a and b

Elaborate the ‘+ ' operator and its constraints along with the help of examples? The + Operator Used on Strings. The + operator could also be used to add string variables or te

JMX framework can enhance the manageability of your application by  1. Monitoring your application for critical events, performance problems, and error condition statistics. E.g