aspose file tools*
The moose likes Struts and the fly likes Struts 2 - Servelts and authorisation Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts 2 - Servelts and authorisation" Watch "Struts 2 - Servelts and authorisation" New topic
Author

Struts 2 - Servelts and authorisation

Craig Burrows
Greenhorn

Joined: Sep 04, 2009
Posts: 1
Hi guys,

I am new to struts 2, I have a few simple queries whose solution can't seem to be found using a search engine.

1. Servlets
Are servlets usefull at all when implementing struts 2? It seems that everything can be performed with action classes and interceptors, so I assume a project implementing struts 2 would never use servlets (or filters)?

2. User authorisation.
With struts 2 is it standard practice to use j_security when implementing secure pages, or to use a custom made authorisation interceptor? (Assuming you are using no other framework for security).


David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

1) It'd be rare to use a servlet, but I'd never say never. For example, if a company had an old image-serving servlet laying around they might use that instead of turning it into an action. Filters are a different matter; IMO they'd be more likely to be used regardless of framework than a servlet.

2) There's no "standard practice" when it comes to choosing which security to use--it depends entirely upon the environment, preferences, etc. Because of Struts 2's tight Spring integration Spring Security (Acegi) is always a popular choice. Container-managed security is also used a lot. So are custom solutions.
 
 
subject: Struts 2 - Servelts and authorisation