PDA

View Full Version : Does Acegi work with Struts as the web tier?


hqfz
Aug 25th, 2004, 11:18 PM
Hi,

I just found Acegi as a very good security framework.

I am using Spring with Struts as the web tier, I'd like to know whether Acegi works under this environment, or I have to use Spring MVC web framework in order to take advantage of Acegi?

Can anyone recommend a good security framework for Struts+Spring?

Thanks!

Gerard Dragoi
Aug 26th, 2004, 06:20 AM
As long as you INJECT those security 'aspects' through Spring
using Acegi it's all fine and dandy.
So, use it with Struts, WebWork, JSF ...
It doesn't really matter!
See contacts or quickstart samples from acegi distribution.
Best regards, Geo

Ben Alex
Aug 26th, 2004, 05:01 PM
Gerard is right. Acegi offers two types of security interceptors:

- A HTTP interceptor which operates at a Servlet filter level. So you can secure any request path (eg /foo/*) independently of the web framework.

- A method invocation interceptor which operates at an AOP level via the Spring application context. Again, this is independent of the web framework.

We also include a taglib which makes it easy to access the contents of the ContextHolder.

I also know a number of Acegi Security users are using Struts.

sailaway
May 2nd, 2007, 06:48 PM
any examples of how to integrate with struts all the samples use spring mvc

karldmoore
May 3rd, 2007, 08:08 AM
There is a good article here explaining how to integrate Spring and Struts. When you are using Acegi, you simply need to ensure you sure the actions e.g. /doSomething.do.
http://www-128.ibm.com/developerworks/java/library/j-sr2.html