//针对同步请求的返回提示
public static class AlertShowMessage{
public static void alertShowMessage(HttpServletResponse response, String message){
response.setContentType("text/html; charset=UTF-8");
PrintWriter pw = null;
try
{
pw = response.getWriter();
pw.print("<script type='text/javascript'>alert('" + message + "');history.back(-1);</script>");
}
catch (Exception e)
{
e.printStackTrace();
}
finally
{
try
{
if(null != pw)
pw.close();
}
catch (Exception e2)
{
e2.printStackTrace();
}
}
}
}