what is difference between redirect and forward method?

Answer Posted / kuljeet singh

forward() method sendRedirect() method

1) forward() sends the same request to another resource. 1) sendRedirect() method sends new request always because it uses the URL bar of the browser.
2) forward() method works at server side. 2) sendRedirect() method works at client side.
3) forward() method works within the server only 3) sendRedirect() method works within and outside the server.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Define scriptlet, expression and declaration in jsp?

498


How to configure init parameters for jsp?

473


What is the jsp:plugin action ?

529


Explain the difference between jspwriter and servlet printwriter in jsp?

504


How do I run a jsp file in linux?

524






What do cookies mean?

500


What is jsp custom tag and what are it’s components?

523


What is an api with example?

593


What do you mean by isscriptingenabled attribute?

475


What is session scope?

501


What is the jspinit() method?

510


What are the different life-cycle methods?

530


Can you stop multiple submits to a web page that are initiated by clicking to refresh button?

483


What is declaration statement?

504


What is a jsp and what is it used for?

523