Thanks Luksz for replying, but what i want is to use the username in Struts 2 action class and display in struts2 jsp tags
Sent from my iPhone On Mar 1, 2013, at 1:09 AM, Lukasz Lenart <[email protected]> wrote: > 2013/3/1 Omar Ngarigari <[email protected]>: >> Hello, >> >> Thanks in advance. I have an application that uses Spring Security 3 + >> Struts2. The integration works just fine. I can login without an issue. >> However, I would like to get the username in the Struts2 action class so >> that I can display in the Struts2 tags jsp pages. > > UserDetails userDetails = > (UserDetails)SecurityContextHolder.getContext().getAuthentication().getPrincipal(); > > http://stackoverflow.com/questions/6161985/get-userdetails-object-from-security-context-in-spring-mvc-controller > > > Regards > -- > Łukasz > + 48 606 323 122 http://www.lenart.org.pl/ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

