In a web application it is common to redirect the user to a web page. For example on successful authentication of a user, he/she is redirected to user home page. Otherwise, redirected to login page again. We have to ways to redirect a user: one is using the sendRedirect() method available onresponse object and the second way is to use the forward() method available in RequestDispatcherinterface. sendRedirect() is executed on client side, whereas forward() is executed on server side.sendRedirect() works only with HTTP, whereas forward() works with any protocol. sendRedirect()takes two request and one response to complete, where as
The post How to redirect users using java servlets appeared first on Coding Security.
How to redirect users using java servlets
read more
Tidak ada komentar:
Posting Komentar