String username = request.getParameter("username");
response.setContentType("text/html"); PrintWriter out = response.getWriter(); out.println("Hello World
");
response.sendRedirect("https://example.com");This package is part of the Java Servlet API, which is typically included in web application servers such as Apache Tomcat or Jetty.