File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Problem in securing the method ( Struts 2 - Spring Security 3.0.3) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Problem in securing the method ( Struts 2 - Spring Security 3.0.3)" Watch "Problem in securing the method ( Struts 2 - Spring Security 3.0.3)" New topic
Author

Problem in securing the method ( Struts 2 - Spring Security 3.0.3)

Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
Hai all,

I am trying to integrate spring security in my project
i have successfully integrated custom authentication, business function.etc

now i am trying to secure my action methods



i have added the security by



my struts action is able to work correctly before i add sec:intercept-method
after i add sec:intercept-methods i am getting the below exception



i have searched many web site and finally i am looking for your help
your experience will help me.

please do reply

thanks in advance

Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
I have traced the problem but still don't know the solution

1)

Note : The below class doesn't implement or extend and other class





my code work with cglib but look at my spring file doesn't have <aop:config proxy-target-class="true" />

I hope <aop:config proxy-target-class="true" /> configuration is not necessary

2) Note : Now the class extend ActionSupport

I get the following exception



now my problem is my class must extend ActionSupport and cglib proxy need to be created

please help me



Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17259
    
    6

Haven't done Spring Security with Struts, but I would have thought you just need to secure the URL that is mapped to that Action class. So you would be using the Spring Security <security: namespace in a Spring configuration file. It seems that would be the easiest approach

><security:intercept-url>

Good Luck

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
found the solution

Spring forum

thanks you Mark Spritzler
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in securing the method ( Struts 2 - Spring Security 3.0.3)