摘要: JSP根据IP段跳转不同页面的问题String remoteHost = request.getRemoteHost(); 得到ip地址,并对ip访问进行限制:public String getIpAddr(HttpServletRequest request) { String ip = request.getHeader("x-forwarded-for"); if(ip == null || ip.length() == 0 || "unknown".equalsIgnoreCase(ip)) { ip = request.getHeader(.. 阅读全文
posted @ 2012-01-07 15:54 wtx 阅读(452) 评论(0) 推荐(0) 编辑