This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I have a shopping cart application. where the user can select the items form the list, which he wants to buy.After selecting, he can click on "Buy" button. Then the user should see the payment gateway page where he can pay the amount using his credit card. Once the payment is done, the message has to be shown in my shopping cart application -"Payment done successfully".
Please tell me whether I have to use forward or send redirect here. And why?
Forward or redirect to where? The gateway, or the "success" page? Do you control the gateway?
Joined: Apr 10, 2010
How that article is related to redirect and forward and why?
Probably my english is very bad but i am sure i found there a really similar issue, and a solution to it, read it if you like.
If i got it wrong, well...sorry, but read that article anyway.
Basically main difference between forward and sendredirect is that when we want to call any JSP or Servlet which is not in my web application then we should go for sendredirect. sendredirect initiate a new request for different JSP or Servlet.
forward is used when we want to call any JSP or Servlet which is present in my web application here same request is sent to different JSP & Servlet.