WebContext w=WebContextFactory.get(); HttpServletRequest r=w.getHttpServletRequest(); String sUrl = r.getRequestURL() + "?" + r.getQueryString(); String userName= (String) r.getSession(true).getAttribute( ParamResources.USER_NAME); String Ip= (String) r.getSession(true).getAttribute( ParamResources.REMOTE_IP);原文链接:https://www.f2er.com/ajax/166348.html