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
TextMessage having instance of java.lang.String as its payload. Therefore it is very useful for exchanging textual data. It can also be used for exchanging difficult character data

What Is a Socket in Java Networking and RMI? Ans) A socket is one end-point of a two-way communication link among two programs running on the network. A socket is bound to a por

What is the name of the services you have chosen? What do they do? What is the name of the publisher? Provide details if you are developing your own service(s). There are variou

In the lectures, we have written programs for bond pricing in discrete time. We have also talked about the theory for bond pricing and yields in continuous time. In this exercise,

In this exercise, I want you to generate password based on random number generator. Develop an application that keeps track of the URL, username and password. I have listed few st

How we Use a Car object in a different class ? class Car { String licensePlate; // e.g. "New York 543 A23" double speed; // in kilometers per hour double maxSpeed;

Taking in Command Line Arguments In Java, the program can be written to accept command-line-arguments. Example Code:  command-line arguments /*  This

I have a parser. it is written in Java. I need to add a hash table to it. I am wondering about if you can do it.

Normal 0 false false false EN-US X-NONE X-NONE

Using Java, write the class Time which consists of the following: (a) three private integer data members (hours, minutes and seconds). (b) a constructor to initialise the dat