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
Explain what is Naming Applets in java applets? You can give an applet a name by using the NAME attribute of the APPLET element. This allows communication between different app

I want to learn java

how to retrieve multiple records randomly from a file and store it in another file

RMI transport layer usually opens direct sockets to the server. Several Intranets have firewalls that do not accept this. To get through the firewall an RMI call may be embedded wi

Jakarta Struts is open source execution of MVC (Model-View-Controller) pattern for the development of web based applications. Jakarta Struts is robust architecture and can be used

Ask question Write an inheritance hierarchy for classes Quadrilateral, Trapezoid, Parallelogram, Rectangle and Square. Use Quadrilateral as the superclass of the hierarchy. Create

What are the conditions for exiting the while loop?

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

how to quit from unlimitedly executing applet