[html] <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <%@ page import="org.apache.log4j.Logger" %> <%@ page import="java.util.*,java.io.*,java.text.*,java.net.*" %> <!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> <html> <head> <title>打印日志</title> </head> <body> <%! public static final String QUERY_PARAM = "queryParam";%> <% Logger log = Logger.getLogger(this.getClass()); // public static final String QUERY_PARAM = "queryParam"; Map parameterMap = request.getParameterMap(); StringBuilder sb = new StringBuilder(); boolean and = false; String queryParam = null; for (Iterator iter = parameterMap.keySet().iterator(); iter.hasNext();) { String name = (String) iter.next(); String[] values = (String[]) parameterMap.get(name); String valueStr = ""; www.2cto.com for (int i = 0; i < values.length; i++) { valueStr = (i == values.length - 1) ? valueStr + values[i] : valueStr + values[i] + ","; } //如果有亂碼有需要轉碼 sb.append(name).append("=").append(valueStr).append(";"); } queryParam = sb.toString(); log.info("alipay支付寶後台回調地址==url:"+request.getRequestURL().toString()+";params:"+queryParam); %> </body> </html>