BA#013 - Difference between response.sendRedirect(), response.sendLocalRedirect() and response.getRequestDispatcher().forward()

sendRedirect(): Redirects to the page specified in the argument. Absolute URL must be provided. Usually done when redirecting to other sites.

sendLocalRedirect(): ATG Specific method. Appends JSESSIONID to url, if JSESSIONID cookie is not found. Also, relative URLs are converted to absolute URLs using this method.
Usually used when redirecting to own site.

getRequestDispatcher().forward(): Same functionality as that in sendLocalRedirect(). This is a J2EE method. 
Asked By: HCL, Nvizion Solutions, Wipro

Other ATG Questions (General Topics):-

2 comments:

Subscribe

Get All The Latest Updates Delivered Straight Into Your Inbox For Free!

Flickr