How will you redirect request to another page in browser in JSP code?

We can use sendRedirect() method in JSP to redirect the request to another location or page.

In this case the request will not come back to server. It will redirect in the browser itself.

Sample code is as follows:

<% response.sendRedirect(URL); %>

Leave a Reply

Your email address will not be published. Required fields are marked *