It doesn't work that way, check once again Hernán's mail, he showed
you interceptor, annotation and how to define a stack. You just must
add annotation into your action.
2013/3/20 Omar Ngarigari :
> I annotated my action class as follow:
>
> @Target({java.lang.annotation.ElementType.METHOD})
> @Re
I annotated my action class as follow:
@Target({java.lang.annotation.ElementType.METHOD})
@Retention(RetentionPolicy.RUNTIME)
public @interface SpringSecurityPrincipal {
public String getUsername();
}
in my action class
public class AddAction extends ActionSupport implements
ModelDriven{
Thus defined in your mail ...
2013/3/20 Omar Ngarigari :
> Which annotation type should I use in my actiom class to inject user object?
>
> Sent from my iPhone
>
> On Mar 20, 2013, at 2:14 AM, Lukasz Lenart wrote:
>
>> 2013/3/20 Omar Ngarigari :
>>> >> value="%{springSecurity.currentUser}"/>
>>
>
Which annotation type should I use in my actiom class to inject user object?
Sent from my iPhone
On Mar 20, 2013, at 2:14 AM, Lukasz Lenart wrote:
> 2013/3/20 Omar Ngarigari :
>> > value="%{springSecurity.currentUser}"/>
>
> You cannot call interceptor directly, it must be an action.
>
>>
2013/3/20 Omar Ngarigari :
> value="%{springSecurity.currentUser}"/>
You cannot call interceptor directly, it must be an action.
> while (((actionClass = actionClass.getSuperclass()) != null) &&
> (!isDone))
> {
> for (Method method : actionClass.getDeclar
> From: Lukasz Lenart
> To: Struts Users Mailing List
> Sent: Friday, March 1, 2013 7:01 AM
> Subject: Re: How to pass the current logged in username to struts2 action
> from spring security 3
>
> 2013/3/1 Omar Ngarigari :
> > Thanks Luksz for replying, but what i
List
> Sent: Friday, March 1, 2013 7:01 AM
> Subject: Re: How to pass the current logged in username to struts2 action
> from spring security 3
>
> 2013/3/1 Omar Ngarigari :
> > Thanks Luksz for replying, but what i want is to use the username in
> Struts 2 action class and di
Thanks Lukasz, I will give a try.
From: Lukasz Lenart
To: Struts Users Mailing List
Sent: Friday, March 1, 2013 7:01 AM
Subject: Re: How to pass the current logged in username to struts2 action from
spring security 3
2013/3/1 Omar Ngarigari :
> Tha
2013/3/1 Omar Ngarigari :
> Thanks Luksz for replying, but what i want is to use the username in Struts 2
> action class and display in struts2 jsp tags
Use that code to read username in your action and then show it using S2 tags
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
--
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 wrote:
> 2013/3/1 Omar Ngarigari :
>> Hello,
>>
>> Thanks in advance. I have an application that uses Spring
2013/3/1 Omar Ngarigari :
> 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 t
11 matches
Mail list logo