import net.sf.json.JSONObject;
import com.opensymphony.xwork2.ActionContext;
import javax.servlet.http.HttpServletResponse;
Map mapShow=new HashMap();
mapShow.put("judge", 1);
ajax(mapShow);
private void ajax(Map mapShow) {
ActionContext ctx = ActionContext.getContext();
HttpServletResponse response = (HttpServletResponse) ctx.get(ServletActionContext.HTTP_RESPONSE);
JSONObject jsonObject = JSONObject.fromObject(mapShow);
try {
response.getWriter().write(jsonObject.toString());
//response.getWriter().write("[{\"demoData\":\"true\"}]");