People usually choose between (not in a specific order):
JAAS (Java / Java EE Default Security Environment)
Spring Security
Custom Security
I never used Spring Security, but the documentation is huge, I gave up trying to do it once because of the time limit. JAAS has the advantages of being simple and working out of the box with Tomcat.
, JAAS.
, , , .
, ( ), , JAAS - , , Spring, .