HttpServletRequest request, HttpServletResponse response) throws Exception {
boolean calcSize = ServletRequestUtils.getBooleanParameter(request, "size", false)
&& SecurityUtils.hasAttributeValueRole(getServletContext(), request);
SessionSearchInfo searchInfo = new SessionSearchInfo();
searchInfo.setSearchAction(StringUtils.trimToNull(ServletRequestUtils.getStringParameter(request, "searchAction", SessionSearchInfo.ACTION_NONE)));
HttpSession sess = request.getSession();
if (searchInfo.isApply()) {
searchInfo.setSessionId(StringUtils.trimToNull(ServletRequestUtils.getStringParameter(request, "searchSessionId")));
searchInfo.setLastIP(StringUtils.trimToNull(ServletRequestUtils.getStringParameter(request, "searchLastIP")));
searchInfo.setAgeFrom(StringUtils.trimToNull(ServletRequestUtils.getStringParameter(request, "searchAgeFrom")));
searchInfo.setAgeTo(StringUtils.trimToNull(ServletRequestUtils.getStringParameter(request, "searchAgeTo")));
searchInfo.setIdleTimeFrom(StringUtils.trimToNull(ServletRequestUtils.getStringParameter(request, "searchIdleTimeFrom")));
searchInfo.setIdleTimeTo(StringUtils.trimToNull(ServletRequestUtils.getStringParameter(request, "searchIdleTimeTo")));
searchInfo.setAttrName(StringUtils.trimToNull(ServletRequestUtils.getStringParameter(request, "searchAttrName")));
if (sess != null) {
sess.setAttribute(SessionSearchInfo.SESS_ATTR_NAME, searchInfo);
}
} else if (sess != null) {
if (searchInfo.isClear()) {
sess.removeAttribute(SessionSearchInfo.SESS_ATTR_NAME);
} else {
SessionSearchInfo ss = (SessionSearchInfo) sess.getAttribute(SessionSearchInfo.SESS_ATTR_NAME);
if (ss != null) {
searchInfo = ss;
}
}
}