I am using FORM authentication, together with Realm. I would like to know how can I log out.
The only solution so far is to close browser, but that's not acceptable from the usability standpoint.
SOLUTION
As pointed by the accepted answer
((HttpServletRequest) request).getSession().invalidate();