I am using auth-method FORM with apache tomcat to authenticate users. I am using the default j_security_check action.
If a user has signed in, I must display a Sign out link. Else a sign in link. How do I check if the user has signed in?
Also, how do I log a user out?
You can use HttpServletRequest.getUserPrincipal()
and check it to find the logged in user.