Sep 13, 2018

How to redirect from servlet to jsp/hmtl web page

HttpServletResponse.sendRedirect(String Location)
i.e. use it as:
HttpServletResponse.sendRedirect("my-jsp-or-other-web.page")
Alternatively, look at the method
HttpServletResponse.setHeader(String name, String value)
The redirection is set by adding the location header:
HttpServletResponse.setHeader("Location", "my-jsp-or-other.web");