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
1. The purpose of this problem is to practice using ArrayLists.Write a Java client file containing a mainmethod plus other methods as needed to solve the following problem (no clas

Java Runtime Environment (JRE) Java Virtual Machine is a part of a large system i.e. Java Runtime Environment (JRE). Every operating system and CPU architecture requires dif

Validate() : Used to validate properties after they have been populated; known as before FormBean is handed to Action. Returns a collection of ActionError as ActionErrors. Followin


What is Inheritance in java Explain with example? Code reusability is claimed to be a key advantage of object-oriented languages over non-object-oriented languages. Inheritance

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

What is an intelligent system? Intelligent systems are the programs established to perform complicated jobs in which reflect human brain and thoughts. If the algorithms are too m

This exercise will give you some introductory exposure to network programming with sockets. Your task is to demonstrate a minimal server program and client program that can send on

You are part of a team creating a system to keep track of computer science books that a publisher is producing. Create a UML class diagram for a "computer science book". You must h

Write a program that takes as input a sequence of transactions of the form