response.sendRedirect("/new-page.jsp");
response.sendRedirect("http://www.example.com/new-page.jsp");
response.sendRedirect("/new-page.jsp?param1=value1¶m2=value2");This code will redirect the client to the "new-page.jsp" page on the same server, with query parameters "param1=value1" and "param2=value2". The javax.servlet.http package library contains the HttpServletResponse class, which includes the sendRedirect method.