Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-20 Thread Lukasz Lenart
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

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-20 Thread Omar Ngarigari
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{

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-20 Thread Lukasz Lenart
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}"/> >> >

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-20 Thread 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}"/> > > You cannot call interceptor directly, it must be an action. > >>

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-19 Thread Lukasz Lenart
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

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-19 Thread Omar Ngarigari
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'

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-01 Thread Hernán
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

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-01 Thread Omar Ngarigari
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

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-01 Thread Lukasz Lenart
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/ --

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-03-01 Thread Omar Ngarigari
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

Re: How to pass the current logged in username to struts2 action from spring security 3

2013-02-28 Thread Lukasz Lenart
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

How to pass the current logged in username to struts2 action from spring security 3

2013-02-28 Thread 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 tags jsp pages. Omar N.

Re: Struts 2 Spring 3 Spring Security 3.1 RedirectAction

2012-06-18 Thread Herná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

Re: Struts 2 Spring 3 Spring Security 3.1 RedirectAction

2012-06-18 Thread Hernán
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

Re: Struts 2 Spring 3 Spring Security 3.1 RedirectAction

2012-06-18 Thread Hernán
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 > > !

Re: Struts 2 Spring 3 Spring Security 3.1 RedirectAction

2012-06-18 Thread Omar Ngarigari
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

Re: Struts 2 Spring 3 Spring Security 3.1 RedirectAction

2012-06-18 Thread Maurizio Cucchiara
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

Struts 2 Spring 3 Spring Security 3.1 RedirectAction

2012-06-18 Thread Hernán
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

Re: Spring Security

2011-03-31 Thread Jason Ferguson
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

Re: Spring Security

2011-03-31 Thread Kushan Jayathilake
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

Spring Security

2011-03-31 Thread CRANFORD, CHRIS
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

Re: Struts2 and Spring Security problem

2010-06-17 Thread Giovanni Cocco
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

Struts2 and Spring Security problem

2010-06-10 Thread 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 result of type "chain" or of type "red

Re: Struts 2, Jquery and Spring Security 3.0

2010-05-25 Thread Robert Taylor
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

Struts 2, Jquery and Spring Security 3.0

2010-05-25 Thread RogerV
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'

Struts & Spring Security

2010-04-30 Thread RogerV
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

RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-17 Thread Lance Hill
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

RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-17 Thread Hoying, Ken
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

RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Lance Hill
] 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.

Re: Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Wes Wannemacher
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

RE: Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Lance Hill
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

Re: Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Wes Wannemacher
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. > > > --

Getting the authenticated user from Spring Security for use in an Action

2010-03-16 Thread Lance Hill
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

Re: Single Sign On And Spring Security

2010-02-25 Thread Frans Thamura
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

Single Sign On And Spring Security

2010-02-25 Thread Lance Hill
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

Re: [S2] Struts Interceptor to refresh Spring Security Context

2009-11-17 Thread Lukasz Lenart
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

[S2] Struts Interceptor to refresh Spring Security Context

2009-11-16 Thread Relph,Brian
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

Re: Unable to upload files in Struts2 with Spring Security filter

2009-09-28 Thread zsundeep
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

Unable to upload files with in Struts2 with Spring Security filter

2009-09-28 Thread zsundeep
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

Re: Struts 2 / Tiles 2 / Spring Security

2009-03-08 Thread Antonio Petrelli
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

Re: Struts 2 / Tiles 2 / Spring Security

2009-03-05 Thread Mohan Radhakrishnan
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

Re: Struts 2 / Tiles 2 / Spring Security

2009-03-05 Thread Antonio Petrelli
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" :

Struts 2 / Tiles 2 / Spring Security

2009-03-05 Thread Mohan Radhakrishnan
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

Re: Spring Security method security with struts2 make all request params in action NULL

2009-01-28 Thread dusty
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

Re: Spring Security method security with struts2 make all request params in action NULL

2009-01-27 Thread dubrovsky
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. ---

Re: Spring Security method security with struts2 make all request params in action NULL

2009-01-27 Thread dusty
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

Re: Spring Security method security with struts2 make all request params in action NULL

2009-01-27 Thread dubrovsky
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

Spring Security method security with struts2 make all request params in action NULL

2009-01-23 Thread dubrovsky
, 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

Re: Warning: Spring Security and FileUploadInterceptor filter order

2008-12-29 Thread Musachy Barroso
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.

Re: Warning: Spring Security and FileUploadInterceptor filter order

2008-12-29 Thread Nils-Helge Garli Hegvik
anyone stuck with > something similar.... > > I have Spring Security protecting my Struts2 app. Originally I had my > filters setup like this: > >struts-prepare >/* > > >securityFilter

Warning: Spring Security and FileUploadInterceptor filter order

2008-12-29 Thread dusty
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

Re: any resolution on your struts2 Spring Security issue in June?

2008-10-28 Thread Alberto Flores
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

Re: Spring Security and Struts2 Using tiles

2008-06-30 Thread Alberto A. Flores
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

Re: Spring Security and Struts2 Using tiles

2008-06-29 Thread JerryK
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

Re: Spring Security and Struts2 Using tiles

2008-05-14 Thread Alberto A. Flores
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

Re: Spring Security and Struts2 Using tiles

2008-05-13 Thread Antonio Petrelli
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

Re: Spring Security and Struts2 Using tiles

2008-05-13 Thread Alberto A. Flores
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

Re: Spring Security and Struts2 Using tiles

2008-05-13 Thread Antonio Petrelli
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

Re: Spring Security and Struts2 Using tiles

2008-05-13 Thread Alberto A. Flores
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

Re: Spring Security and Struts2 Using tiles

2008-05-13 Thread Antonio Petrelli
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,

Spring Security and Struts2 Using tiles

2008-05-13 Thread Alberto A. Flores
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

Re: Spring security vs container-managed

2004-09-26 Thread Adam Hardy
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

Re: Spring security vs container-managed

2004-09-26 Thread Craig McClanahan
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

Spring security vs container-managed

2004-09-25 Thread Adam Hardy
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