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
In programming, what is a loop? A loop is a programming language statement that permits your code to be repeatedly executed LOOP is a pedagogical programming language designed

What is asynchronous messaging? Queue Ans) Asynchronous messaging includes a client that does not wait for a message from the server. An event is used to trigger a message from

How can we define the difference between the Boolean & operator and the && operator ?

Question: (a) Java does not support multiple inheritance but does provide the concept of ‘interface'. Explain how interfaces can help a programmer to implement multiple inheri

Explain JAR Archives ? HTTP 1.0 uses a separate connection for every request. When you're downloading several small files, the time required to set up and tear down the connec

A:Java is a computer language. There are some of the reasons which describe:   1. Built-in support for multi-threading, memory management (automatic garbage collection), and

What is the difference among using bind() and rebind() methods of Naming Class? Ans) Bind method (String name) binds the specified name to a remote object whereas rebind(String

An ActionForm is a JavaBean that extends org.apache.struts.action.ActionForm.  ActionForm handles the session state for web application and the ActionForm object is automatically p

How to Wrapping Your Own Packages in java? Java does not limit you to using just the system supplied packages. You can write your own as well. You write packages just such as

A Queue of Cards You are going to parallel the development done in the lesson on inheritance where we constructed some base classes, StackNode and Stack, and derived  Floa