/** html显示页面出错警告
*
* @param response
* @param message*/
public voidshowWrongMessage(HttpServletResponse response, String message) {
response.setContentType("text/html;charset=GBK");
StringBuffer buf= newStringBuffer();
buf.append("");
buf.append("");
buf.append("
");buf.append("");
buf.append("
提示信息");buf.append("");
buf.append("
");buf.append("
buf.append("var x = 640;");
buf.append("var y = 480;");
buf.append("var xx = (window.screen.width - x) / 2;");
buf.append("var yy = (window.screen.height - y) / 2;");
buf.append("window.close();");
buf.append("var windowFeatures = \"width=\" + x + \",height=\" + y + \",status,scrollbars=yes,resizable,left=\" + xx + \",top=\" + yy + \"screenX=\" + xx + \",screenY=\" + yy; ");
buf.append("var win=window.open('','',windowFeatures);");
buf.append("win.document.write('提示信息 :');");
buf.append("win.document.write('
sorry " + message + "
buf.append(" ");
buf.append("");/*buf.append("
");buf.append("提示信息 :");
buf.append("
sorry " + message + "
buf.append("");*/buf.append("");byte[] bs =buf.toString().getBytes();
ServletOutputStream ouputStream= null;try{
ouputStream=response.getOutputStream();
ouputStream.write(bs,0, bs.length);
ouputStream.flush();
}catch(IOException e1) {
e1.printStackTrace();
}finally{if (ouputStream != null) {try{
ouputStream.close();
}catch(IOException e1) {
e1.printStackTrace();
}
}
}
}