This week's giveaway is in the Programmer Certification (OCPJP) forum.
We're giving away four copies of Java Mock Exams (software) and have David Mayer on-line!
See this thread for details.
Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

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

 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 17309
11
IntelliJ IDE Mac Spring
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Jayaraj Jaganathan
Ranch Hand
Posts: 70
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
found the solution

Spring forum

thanks you Mark Spritzler
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!