if(requestURI.contains("/app/") && (requestURI.contains("/mbr") || requestURI.contains("/detail/det"))){
String token = req.getParameter("session_token");
//if(null == CacheUtil.getElement("session_token", token)){
if(null == token || "".equals(token)){
String data = "{\"code\":414,\"msg\":\"\"}";
PrintWriter writer = response.getWriter();
writer.print(data);
writer.close();
return;
}
Object result = session.access(token);
if (result instanceof AppSessionBean) {
AppSessionBean sessionBean = (AppSessionBean) result;
req.getSession().setAttribute("userData",sessionBean.getSession());
req.getSession().setAttribute("userId",sessionBean.getUserId());
} else {
Map json = (result instanceof Map) ? (Map) result : MapUtil.array2Map((Object[][]) result);
if(requestURI.contains("/wap/app/mbr/index")) {
json.put("code", 414);
}
String data = "{\"code\":"+json.get("code")+",\"msg\":\""+json.get("msg")+"\"}";
PrintWriter writer = response.getWriter();
writer.print(data);
writer.close();
return;
}
}