I want to store user information after logging in and to display my login and username on every page (using jsp). How can I get access in my jsp views to the session bean that w
This is a near duplicate to When using Spring Security, what is the proper way to obtain current username (i.e. SecurityContext) information in a bean?. The Spring endorsed method is
final String currentUser = SecurityContextHolder.getContext().getAuthentication().getName();
but the linked discussion has alternatives.