private static void generateJavaScriptLogAlertCloseWindow(Writer writer,String message) throws IOException {
  writer.write("<script language=\"javascript\">alert(\"" + message + "\");");
  writer.write("window.close();");
  writer.write("</script>");
}

private static void generateJavaScriptLogAlertCloseWindow ( Writer writer , String message ) throws IOException { writer . write ( "<script language=\"javascript\">alert(\"" + message + "\");" ) ; writer . write ( "window.close();" ) ; writer . write ( "</script>" ) ; }
metodo que genera un alert con el mensaje de error y ademas cierra la ventana que se intenta abrir
