1: struts2 返回上页并非input页面 public static void print(String resultString) { if (null == resultString || "".equals(resultString)) { return; } try { HttpServletResponse response = ServletActionContext.getResponse(); response.setCharacterEncoding("UTF-8"); response.setContentType("text/html; charset=utf-8"); PrintWriter out; out = response.getWriter(); out.print("<mce:script type="text/javascript"><!-- alert(" + resultString + ");history.back(-1); // --></mce:script>"); } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }