This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Problem in integrated spring security with struts 2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Problem in integrated spring security with struts 2 " Watch "Problem in integrated spring security with struts 2 " New topic
Author

Problem in integrated spring security with struts 2

Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
I am trying to integrated spring security with struts 2.



when user access onLoad or onUpdate method i am getting error page 500
org.springframework.security.access.AccessDeniedException: Access is denied

instead it has to redirect to login page to get user credentials and back

I don't know what i configuration i have missed out
please help me

Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
after comparing this two log file i came to know that
my exception is not handled by ExceptionTranslationFilter

Spring security with spring mvc
the exception is catched by DispatcherServlet and redirected to login page

but in struts 2 we don't need DispatcherServlet
please some one tell me how to integrate spring security with struts 2

log file spring security with struts

log file spring security with spring mvc
Jayaraj Jaganathan
Ranch Hand

Joined: Jun 29, 2009
Posts: 70
I was using StrutsPrepareAndExecuteFilter for struts2 which catches my exception

I changed to latest version FilterDispatcher filter for struts2 which performs exactly same as i expected

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem in integrated spring security with struts 2