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:
- How to get username after login with FORM based authentication
- j_security_check need user name to populate form from database
- http://www.coderanch.com/t/284314/JSP/java/doesn-request-getParameter-username-work
Also, I am not invalidating the session during this process.