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
current logged in username to struts2 action from
spring security 3
In order to have the user available in several action objects, you could
write an interceptor, this is the way struts2 handles the so called cross
cutting concerns (it would be Aspect Oriented Programming in Spring)
Here'
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/
--
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 =
&g
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 disp
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.
Omar N.
I have tried with Struts 2.3.4 Spring 3.0.5.RELEASE and Spring Security
3.0.5.RELEASE and no success. I thing it's important to mention I'm using
Tiles, this time 2.2.2, but I kept trying with Tiles 2.0.6 before and it
was the same... What I can tell you to bear in mind is that
/Start/Pr
I was using Struts 2.3.4 Spring 3.0.6.RELEASE and Spring Security
3.1.0.RELEASE now I will try to use Spring Security 3.0 to see what happens.
On Mon, Jun 18, 2012 at 11:12 AM, Hernán wrote:
> Well I don't know what is the problem really and there is nothing in the
> web, so
a
>
>
> On 18 June 2012 15:03, Hernán wrote:
>
> > I have upgraded a webApp using struts 2 to use Spring 3 and Spring
> Security
> > 3.1, before that Spring 2.5 and Spring Security 2 was used. The problem
> is
> > that when using redirectAction I get a
> > !
I am using struts 2.3.1.2 version and also using simple theme.
From: Maurizio Cucchiara
To: Struts Users Mailing List
Sent: Monday, June 18, 2012 10:01 AM
Subject: Re: Struts 2 Spring 3 Spring Security 3.1 RedirectAction
Could you specify your struts2
https://plus.google.com/107903711540963855921
Linkedin:http://www.linkedin.com/in/mauriziocucchiara
Maurizio Cucchiara
On 18 June 2012 15:03, Hernán wrote:
> I have upgraded a webApp using struts 2 to use Spring 3 and Spring Security
> 3.1, before that Spring 2.5 and Spring Security
I have upgraded a webApp using struts 2 to use Spring 3 and Spring Security
3.1, before that Spring 2.5 and Spring Security 2 was used. The problem is
that when using redirectAction I get a
!Namespace?parameters#namespace added to the URL's and that is not a good
idea... I need the URL wi
Here a Basics of Spring Security 3 presentation I gave at the St Louis
Java User group, but didn't have much time to go into securing
objects.
http://www.slideshare.net/jasonferguson1/spring-security-3
On Thu, Mar 31, 2011 at 12:31 PM, CRANFORD, CHRIS
wrote:
> If anyone here has ex
Yep.. I'm writing an article in my blog about Spring Security. Method level
security will be the next post. Stay in touch.
You can reach me through my blog.
http://kushanxp.blogspot.com/
On Thu, Mar 31, 2011 at 11:01 PM, CRANFORD, CHRIS wrote:
> If anyone here has experience wit
If anyone here has experience with Spring Security, particularly with
securing methods and domain objects with ACL or ACL-like
implementations, I'd like to have an off-list discussion about some
issues I am facing that I am in need to working through somewhat
quickly. Feel free to drop me a
2010/6/10 Giovanni Cocco
> Hi,
> I'm experiencing some problems in a project based on jAPS (
> http://www.japsportal.org). The jAPS backend is based on Struts2.
> For integration with a IDM System we introduced SpringSecurity on the
> application. The problem is that when Struts2 is executing a r
Hi,
I'm experiencing some problems in a project based on jAPS (
http://www.japsportal.org). The jAPS backend is based on Struts2.
For integration with a IDM System we introduced SpringSecurity on the
application. The problem is that when Struts2 is executing a result of type
"chain" or of type "red
Your AJAX request to load the tab is getting redirected to the login content
instead of the tab content due to the session time out and the spring
security authentication.
Therefore your tab is displaying the login screen.
You could add a Javascript component to "timeout" and either
one of the tabs invokes the login page from
Spring security as it should, except the login page appears as the content
of the selected tab.
How(Can) I configure Spring security so that the login page always appears
as a display in it's own right. If the login program was a Struts Action I'
I'm trying to get Spring Security 3.0 working with a Struts 2.0.18 web-app
that uses the Convention plugin using a customised login form. So far I've
got
"login" and "startup" are Struts actions and work fine for the login-page,
default
authenticated user from Spring Security for use in
an Action
Try:
SecurityContextHolder.getContext().getAuthentication().getPrincipal()
-Original Message-
From: Lance Hill [mailto:la...@baldhead.com]
Sent: Tuesday, March 16, 2010 5:15 PM
To: 'Struts Users Mailing List'
Subject: G
Try:
SecurityContextHolder.getContext().getAuthentication().getPrincipal()
-Original Message-
From: Lance Hill [mailto:la...@baldhead.com]
Sent: Tuesday, March 16, 2010 5:15 PM
To: 'Struts Users Mailing List'
Subject: Getting the authenticated user from Spring Security for
]
Sent: Tuesday, March 16, 2010 5:54 PM
To: Struts Users Mailing List
Subject: Re: Getting the authenticated user from Spring Security for use in
an Action
I use -
SecurityContextHolder.getContext().getAuthentication()
I assume that if the object returned is null, then the user isn't logged in.
I use -
SecurityContextHolder.getContext().getAuthentication()
I assume that if the object returned is null, then the user isn't logged in.
I am using spring-security 2.0.4.
-Wes
On Tue, Mar 16, 2010 at 5:42 PM, Lance Hill wrote:
> I have Spring Security set u
I have Spring Security set up to use CasAutheticationProvider to provide a
UserDetails object.
I did find an example that uses the SecurityContext to obtain an
Authentication object and grab the UserDetails from there. I am not sure how
to get access to the populated SecurityContext since
o be done, but I have not found examples of how to get access to the
> current user from Spring/Spring Security. Can someone please provide a link
> or brief example of the best practice?
>
>
> Thank you.
>
>
> --
I need to access information about the currently logged in user. I don't
think putting the user into the session during login is how it is supposed
to be done, but I have not found examples of how to get access to the
current user from Spring/Spring Security. Can someone please provide a li
i believe the cool reference only roller 5 which it is not released yet
F
On Thu, Feb 25, 2010 at 10:11 PM, Lance Hill wrote:
> Hello,
>
>
>
> I am hoping someone can provide me with some links or examples of how to
> combine Struts 2 with Spring security. The end goa
Hello,
I am hoping someone can provide me with some links or examples of how to
combine Struts 2 with Spring security. The end goal is to use Spring
security to access a CAS server (http://www.jasig.org/cas) in order to
provide single sign on ability between a Struts2 application and a
2009/11/16 Relph,Brian :
> How does the interceptor object get built?
By ObjectFactory or you can use integration with Spring and then it
will be built by Spring.
Regards
--
Lukasz
http://www.lenart.org.pl/
-
To unsubscribe, e
Hi,
I am writing an interceptor that will re-populate the spring security context.
For example, this will allow me to annotate my ChangePasswordAction with
@Refresh, so after invocation, the SecurityContext will also contain the
changed password. To do this, my interceptor needs a copy of
My mistake ...
I should have had Spring security filter before struts2 and not the other
way.
zsundeep wrote:
>
> I am able to upload files in struts2 (2.1.6) only when I remove the spring
> security filter in web.xml. When I use the spring security filter, I get a
> null ob
I am able to upload files in struts2 (2.1.6) only when I remove the spring
security filter in web.xml. When I use the spring security filter, I get a
null object in File inside action class. That is the line
"testFile.length()" in sample code provided below, throws null-pointer
except
2009/3/6 Mohan Radhakrishnan :
> The other concern I have is the mention of experimental features in Struts
> 2( Tiles Plugin ? ). We cannot use those as our app. is a financial app. on
> the internet.
Why not? You can simply grab it and modify it (following the Apache
License), or help the commun
Actually I included Spring security because I remember having seen some mails
about Tiles and Spring security combination( Something to do with
includes/forwards ).
We don't have experience with Sitemesh. Out pages are not very complex now
but in the future they may be. We require custo
2009/3/5 Mohan Radhakrishnan :
>
> Is Tiles still the most common approach to layout pages especially
> when you have a combination of Struts 2 / Tiles 2 / Spring Security ? What
> is the recommendation of the forum ?
I think that your question was not "well-formed" :
Hi,
Is Tiles still the most common approach to layout pages especially
when you have a combination of Struts 2 / Tiles 2 / Spring Security ? What
is the recommendation of the forum ?
Thanks,
Mohan
--
View this message in context:
http://www.nabble.com/Struts-2---Tiles-2---Spring-Security
Ah. The reason I ask is I had a similar problem but with the updated
StrutsPrepare and StrutsExecute filters. Spring Security modified the
request in a way that Struts was not expecting and therefore Struts could
not find what it was looking for. You may need to step through Spring
Security
View this message in context:
http://www.nabble.com/Spring-Security-method-security-with-struts2-make-all-request-params-in-action-NULL-tp21624393p21700532.html
Sent from the Struts - User mailing list archive at Nabble.com.
---
pringsource.org/showthread.php?t=66381
>
>
--
View this message in context:
http://www.nabble.com/Spring-Security-method-security-with-struts2-make-all-request-params-in-action-NULL-tp21624393p2179.html
Sent from the Struts - User mailing list
I posted reply for this problem in Spring community forum. Who is interested
in, please follow the link -
http://forum.springsource.org/showthread.php?t=66381
http://forum.springsource.org/showthread.php?t=66381
--
View this message in context:
http://www.nabble.com/Spring-Security-method
, help me to resolve the issue, if anybody already occured it. Or may
be someone could share his knowledge how to properly configure Struts2
application to use Spring Secure method security.
--
View this message in context:
http://www.nabble.com/Spring-Security-method-security-with-struts2-make-all
could you add this to the wiki? thanks for letting us know.
musachy
On Mon, Dec 29, 2008 at 1:19 PM, dusty wrote:
>
> Hello,
>
> This vexed me, so I thought I would share to help anyone stuck with
> something similar....
>
> I have Spring Security protecting my Struts2 app.
anyone stuck with
> something similar....
>
> I have Spring Security protecting my Struts2 app. Originally I had my
> filters setup like this:
>
>struts-prepare
>/*
>
>
>securityFilter
Hello,
This vexed me, so I thought I would share to help anyone stuck with
something similar
I have Spring Security protecting my Struts2 app. Originally I had my
filters setup like this:
struts-prepare
/*
securityFilter
hat thread
for other lost souls :)
Again, thanks greatly for your response; i feel hopeful again about the
matter!
j.
*From:* Alberto A. Flores [mailto:[EMAIL PROTECTED]
*Sent:* Monday, October 27, 2008 4:51 PM
*To:* Mad
would be much appreciated...
JerryK wrote:
I was able to get this working with Acegi, by setting the Dispatcher property
in web.xml
/*
REQUEST
INCLUDE
FORWARD
But, now when i try this with Spring Security 2.0.1, i am facing the same
problem as you have
I was able to get this working with Acegi, by setting the Dispatcher property
in web.xml
/*
REQUEST
INCLUDE
FORWARD
But, now when i try this with Spring Security 2.0.1, i am facing the same
problem as you have described here. Have you found any solution so
After further testing, it looks like even without tiles, the strut2
action mapping is not secured with Acegi/Spring Security (as of version
2.0.1, Struts version 2.0.11). As far as I can tell, it has to do with
the FilterDispatcher (Struts2) always forwarding to ActionProxy class to
process
2008/5/13 Alberto A. Flores <[EMAIL PROTECTED]>:
> I would, but it seems to me like there is little that can be done on the
> Struts2 side (unless a plugin of some sort is written). Essentially, when
> control is forwarded to the tile, Spring security can not do much (or mayb
I would, but it seems to me like there is little that can be done on the
Struts2 side (unless a plugin of some sort is written). Essentially,
when control is forwarded to the tile, Spring security can not do much
(or maybe I'm missing something).
The Spring Security team is well aware o
2008/5/13 Alberto A. Flores <[EMAIL PROTECTED]>:
> I don't thinks that's possible as the Struts2 result would be something
> like:
>
> my.tile
>
> In here, I don't have access to the forward.
Mmm... it's starting to be complicated, and I think that there is a
bug somewhere.
Can you open a JIRA i
I don't thinks that's possible as the Struts2 result would be something
like:
my.tile
In here, I don't have access to the forward.
Antonio Petrelli wrote:
2008/5/13 Alberto A. Flores <[EMAIL PROTECTED]>:
My understanding is that Spring Security does not secure resou
2008/5/13 Alberto A. Flores <[EMAIL PROTECTED]>:
> My understanding is that Spring Security does not secure resources on
> *forwards* (I believe tiles2 do forward/chaining).
Forwards and includes, that's where I think there may be a fault.
Can you try if, using simple tags,
Folks,
My understanding is that Spring Security does not secure resources on
*forwards* (I believe tiles2 do forward/chaining). In an application
using Struts2, Spring and Tiles2, these forwards work just fine. Has
anyone had success using these three frameworks together using Spring
On 09/26/2004 11:47 PM Craig McClanahan wrote:
On Sat, 25 Sep 2004 22:24:36 +0200, Adam Hardy
<[EMAIL PROTECTED]> wrote:
[snip]
The suggested solution is to wrap all form controls in a Spring-based
role-manager taglib. The JSPs are ugly enough as it is so I find that
idea bad.
Isn't that pretty mu
On Sat, 25 Sep 2004 22:24:36 +0200, Adam Hardy
<[EMAIL PROTECTED]> wrote:
> [snip]
> The suggested solution is to wrap all form controls in a Spring-based
> role-manager taglib. The JSPs are ugly enough as it is so I find that
> idea bad.
Isn't that pretty much the same thing that you would do if
usability-tested at all. Each page will have a crowd of controls whose
presence depends on the user's role.
What I was planning was to seperate the role-specific form controls into
another tile and use the tiles role-authorisation. However Spring
security is now the order of the day, and
64 matches
Mail list logo