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?

[766 byte] By [kacheeka] at [2007-10-2 18:24:35]
# 1
Do you get a javascript error? I notice the second script tag is missing the "/" to indicate it's a closing tag.
black_lotusa at 2007-7-13 19:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
no problem with the script tags. i even triedoutput.println("<script language = javascript>");and it doesnt work too.
kacheeka at 2007-7-13 19:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
sorry. i mean output.println("<script type=\"text/javascript\">");it doesnt work too
kacheeka at 2007-7-13 19:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 4
> sorry. i mean output.println("<script> type=\"text/javascript\">");> it doesnt work tooI am referring to the second script tag. A closing javascript tag should be </script>, not <script>.
black_lotusa at 2007-7-13 19:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 5
yes. i've amend that changes... and it still doesnt work
kacheeka at 2007-7-13 19:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 6
yes. i've amend the changes and it doesnt work too.
kacheeka at 2007-7-13 19:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 7
The message you want to alert should be in quotes: alert("test");
black_lotusa at 2007-7-13 19:45:33 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...