how to create a popup message
i wanna have a popup message to inform the user that a particular action has been done successfully and redirect them to another page.
but the popup message doesnt appear when i apply the following codes.
// more codes above
try{
Ps = Con.prepareStatement(sSQL);
Ps.executeUpdate();
System.out.println(sSQL);
Con.close();
}
catch (Exception e) {
System.err.print("Jdbc.Query(): " + e.getMessage());
}
output.println("<script language = javascript>");
output.println("alert(Added successfully);");
output.println("<script>");
String url = response.encodeRedirectURL("http://localhost:8080/....");
response.sendRedirect(url);
what's my mistake?

