<%@ page import="java.lang.StringBuffer" %> <%@ page import="java.util.HashMap" %> <%@ page import="org.apache.commons.lang.StringUtils" %> <% String tipMsgKey = (String)request.getAttribute(com.forgon.tools.AppKeys.TipMsgKey); if (StringUtils.isNotEmpty(tipMsgKey)) { HashMap messageMap = new HashMap(); messageMap.put("tipMessage", tipMsgKey); request.setAttribute("messageMap", messageMap); } StringBuffer scriptBuffer = new StringBuffer(); if (StringUtils.isNotEmpty(tipMsgKey)) { scriptBuffer.append("if (tipMessage != '') {alert(tipMessage);}"); } scriptBuffer.append("window.close();"); scriptBuffer.append("window.opener.focus();"); String redirectTo = (String)request.getAttribute(com.forgon.tools.AppKeys.RedirectTo); if (StringUtils.isEmpty(redirectTo)) { scriptBuffer.append("window.opener.location=window.opener.location;"); } else { scriptBuffer.append("window.opener.location = '" + redirectTo + "';"); } request.setAttribute("toRunScripts", scriptBuffer.toString()); %> <%@ include file="/common/JsHelper.jsp" %>