1

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.

Community
  • 1
  • 1
Rajeev Akotkar
  • 1,377
  • 4
  • 26
  • 46
  • Which WebSphere version are you using - traditional or Liberty? In general, you need to have `Application security` enabled in the server configuration, and correct config in the `web.xml`. – Gas May 24 '16 at 13:00

0 Answers0