1

I am trying to integrate Struts 2 and Spring security 3. I don't understand how to handle session, with both.Is there a standard way?

I know of struts session built in session handling, ActionContext

eg

Map session = ActionContext.getContext().getSession();
session.put("userIdx","xxxxx");

But not how to use spring security along with it.

There are lots of Spring MVC tutorials on using Spring Security 3, but not a lot on Struts 2 and Spring Security 3. Do you know of any good tutorials? Or would I be better using Spring MVC?

Roman C
  • 49,761
  • 33
  • 66
  • 176
user230272
  • 63
  • 6
  • check this out may be will give you some idea http://stackoverflow.com/questions/3886256/how-do-i-get-the-spring-security-sessionregistry – Umesh Awasthi Nov 22 '11 at 13:24
  • there is no problem in integrating Struts 2 with Spring Security 3. There is as such no need to move to Spring MVC. I have made application using these two but till now I did not use specifically session. Are you facing any problem with session ? – gprathour Nov 22 '11 at 13:24
  • Thank you for the comments, but just to clarify. In struts 2 you can have session stored in ActionContext. And in Spring security 3, in SessionRegistry. Should I just use SessionRegistry, in Spring Security and ignore session in ActionContext. Or, if you have experience of using both with session, how did you handle it. – user230272 Nov 22 '11 at 15:35
  • 2
    @kfl The session is the session: all the action context does is wrap up access to the session map. – Dave Newton Nov 22 '11 at 15:50
  • 1
    @kfl agree with Dave!! Additionally will not suggest to user ActionContext rather user SessionAware – Umesh Awasthi Nov 22 '11 at 16:28

0 Answers0