I am trying to display a result in pop-up and then redirect to jsp page.
I have used bellow code ,which is not displaying pop up and it is redirecting to jsp page.
out.println("<!DOCTYPE html>");
out.println("<html>");
out.println("<head>");
out.println("<title>Servlet NewServlet</title>");
out.println("</head>");
out.println("<body onLoad=\"myFunction();\">");
out.println("<script>");
out.println("function myFunction(){");
out.println("alert(\""+splitVal[4]+"\")");
out.println("}");
out.println("</script>");
out.println("</body>");
out.println("</html>");
response.sendRedirect("NewFile1.jsp");
Both are not working at once. Individually I am able to display pop up and redirect to jsp page and in the above code pop-up is not displaying, But it is not working together. Please help me. Thanks.