Rajeev Akotkar
Rajeev Akotkar

Reputation: 1397

request.getUserPrincipal() returns null in WebSphere

I am using form based authentication with Websphere app server (j_security_check). I want to log the value of j_username. I am not able to do so since I get request.getUserPrincipal() as null. I am not able to get any methods in SecurityContextHolder and I am even getting request.getRemoteUSer as null even on my error page as configured in web.xml.

Already tried the below things:

  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

Also, I am not invalidating the session during this process.

Upvotes: 1

Views: 1625

Answers (0)

Related Questions