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 <lukaszlen...@apache.org> wrote:

> 2013/3/1 Omar Ngarigari <ngarigar...@yahoo.com>:
>> 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: user-unsubscr...@struts.apache.org
> For additional commands, e-mail: user-h...@struts.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to