struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "M. Rakowski" <>
Subject Re: Authentication and authorization
Date Thu, 19 Apr 2012 22:53:30 GMT
a brief explanation for basic spring-security (only authentication) 
configuration with struts:

Spring security is running as a filter in your web-app
(you need to make sure that it comes first before Struts).
For the filter-configuration take a look at (2.2.1):

Than you will have to provide a context file where you
define the whole configuration for Spring-security:
- <intercept-url pattern="" access=""/> : access roles for certain url 
- <form-login login-page="your-struts-login-action" /> : configuration 
for login
- <authentication-manager> : to provide a service for 
user-authentication, like:
user-service-ref="your-authentication-service"> [...]

The last step is the implementation of the authentication-service
UserDetails loadUserByUsername(String username)
and UserDetails-Interfaces (your User-Bean).

For all authenticated struts-actions you can get UserDetail
by accessing 

I hope i could help you with this short explanation which covers only 
basic usage of spring.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message