public String testPost() throws Exception { ResultMessage resultMessage = new ResultMessage(); if (!StringUtils.isEmpty(user)) { resultMessage.setSuccess(true); resultMessage.setMessage("user is not null"); } else { resultMessage.setSuccess(false); resultMessage.setMessage("user is null"); } return "resultMessage";}public String testPost2() throws Exception { Map<String, Object> retMessage= new HashMap<String, Object>(); if (!StringUtils.isEmpty(user)) { retMessage.put("result", true); retMessage.put("message", "user is not null"); } else { retMessage.put("result", false); retMessage.put("message", "user is null"); } ActionContext.getContext().getValueStack().set("retMessage", retMessage); return "testPost2";}