click菜单点击无效
protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { req.setCharacterEncoding("UTF-8"); resp.setCharacterEncoding("UTF-8"); PrintWriter out = resp.getWriter(); try { Map<String, String> map = MessageUtil.xmlToMap(req); String fromUserName = map.get("FromUserName"); String toUserName = map.get("ToUserName"); String msgType = map.get("MsgType"); String content = map.get("Content"); String message = null; if (MessageUtil.MESSAGE_TEXT.equals(msgType)) { if ("1".equals(content)) { message = MessageUtil.initText(toUserName, fromUserName, MessageUtil.firstMenu()); } else if ("2".equals(content)) { message = MessageUtil.initNewsMessage(toUserName, fromUserName); } else if ("?".equals(content) || "?".equals(content)) { message = MessageUtil.initText(toUserName, fromUserName, MessageUtil.menuText()); } }else if (MessageUtil.MESSAGE_EVNET.equals(msgType)) { String eventType = map.get("Event"); if (MessageUtil.MESSAGE_SUBSCRIBE.equals(eventType)) { message = MessageUtil.initText(toUserName, fromUserName, MessageUtil.menuText()); }else if(MessageUtil.MESSAGE_CLICK.equals(eventType)){ String eventKey = map.get("EventKey"); if (eventKey.equals("11")) { message = MessageUtil.initText(toUserName, fromUserName, MessageUtil.menuText()); } }else if(MessageUtil.MESSAGE_VIEW.equals(eventType)){ String url = map.get("EventKey"); message = MessageUtil.initText(toUserName, fromUserName, url); }else if(MessageUtil.MESSAGE_SCANCODE.equals(eventType)){ String key = map.get("EventKey"); message = MessageUtil.initText(toUserName, fromUserName, key); } }else if(MessageUtil.MESSAGE_LOCATION.equals(msgType)){ String label = map.get("Label"); message = MessageUtil.initText(toUserName, fromUserName, label); } System.out.println(message); out.print(message); } catch (DocumentException e) { e.printStackTrace(); } finally { out.close(); } }
菜单创建成功,文本消息回复和view菜单工作正常,但click点击之后就显示服务器不能提供服务,位置信息的回复也不成功,求助TAT