document = new HashMap
(); InputStream input = request.getInputStream(); String str = IOUtils.toString(input); StringTokenizer st = new StringTokenizer(str, "&"); while (st.hasMoreElements()) { String[] s = st.nextToken().split("="); if (s.length == 1) { document.put(s[0], ""); } else if (s.length == 2) { String name = s[0]; String value = s[1]; value = URLDecoder.decode(value, "UTF-8"); document.put(name, value); } else { // System.out.println(Arrays.asList(s)); } } document.put("ip", RequestHelper.getIpAddr(request)); String write_time = DateFormatUtils.format(new Date(), "yyyyMMddHHmmss"); document.put("m1", "" + Long.parseLong(write_time)); String json = gson.toJson(document); loggerPerHour.info(json); document.put("M17", ""); document.put("M4", ""); json = gson.toJson(document); loggerDailyLog.info(json); } catch (Exception e) { debugLog.info(e.getMessage(), e); } } } private void outHtml(HttpServletResponse response){ try { response.setHeader("Pragma", "No-cache"); response.setHeader("Cache-Control", "no-cache"); response.setDateHeader("Expires", 0L); PrintWriter out = response.getWriter(); out.write("{}"); out.flush(); out.close(); } catch (IOException e) { } } }