request.getUserPrincipal()在WebSphere中返回null

时间:2016-05-01 07:23:19

标签: java-ee websphere j-security-check

我正在使用基于表单的身份验证与Websphere应用服务器(j_security_check)。我想记录j_username的值。由于request.getUserPrincipal()null,我无法这样做。我无法在SecurityContextHolder中获取任何方法,即使在我在web.xml中配置的错误页面上,我甚至会将request.getRemoteUSer作为null

已经尝试过以下内容:

  1. How to get username after login with FORM based authentication
  2. j_security_check need user name to populate form from database
  3. http://www.coderanch.com/t/284314/JSP/java/doesn-request-getParameter-username-work
  4. 此外,我不会在此过程中使会话无效。

0 个答案:

没有答案