锘�%@ page contentType="text/html;charset=utf-8" %>
<%@page import="com.soarwell.weixin.*"%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title>
</head>
<%
  String echostr = request.getParameter("echostr");
  if(null==echostr||echostr.isEmpty()){
	//澶勭悊寰俊鏈嶅姟鍣ㄥ彂鏉ョ殑娑堟伅
	// 灏嗚姹傘�鍝嶅簲鐨勭紪鐮佸潎璁剧疆涓篣TF-8锛堥槻姝腑鏂囦贡鐮侊級
	request.setCharacterEncoding("UTF-8");
	response.setCharacterEncoding("UTF-8");	
	
	// 璋冪敤鏍稿績涓氬姟绫绘帴鏀舵秷鎭�澶勭悊娑堟伅
	String respMessage = CoreService.processRequest(request);
	out.println(respMessage);
  } else {
	// 寰俊鍔犲瘑绛惧悕
	String signature = request.getParameter("signature");
	// 鏃堕棿鎴�
	String timestamp = request.getParameter("timestamp");
	// 闅忔満鏁�
	String nonce = request.getParameter("nonce");
	if (SignUtil.checkSignature(signature, timestamp, nonce)) {
		out.print(echostr);
	}	
  }
%>
