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); %>

Read the full book at www.amazon.com
Posted in JSP, JSP Interview Questions

Leave a Reply

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

*